Skip to content

Commit

Permalink
Adição do docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzer0 committed May 18, 2024
1 parent 311237f commit 5728cfd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.env
./backend/.env
2 changes: 1 addition & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/.bundle

# Ignore all environment files (except templates).
/.env*
/.env
!/.env*.erb

# Ignore all logfiles and tempfiles.
Expand Down
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "2.1"

services:
postgres: # nome do serviço a ser criado
image: postgres # nome da imagem existente no docker hub
ports: ["5432:5432"] # porta a ser exposta para fora do container
networks: [backing-services] # definição de rede virtual para outros possíveis serviços a serem disponibilizados na mesma rede possam acessar
volumes: ["./data"] # definição de local onde estará exposto o volume persistente
environment: # Variáveis de ambiente , no caso o nome do banco o usuário e senha de acesso que é criada dinamicamente quando o container é criado
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres

networks: # configuação de rede virtual
backing-services:
driver: bridge

0 comments on commit 5728cfd

Please sign in to comment.