-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (39 loc) · 946 Bytes
/
docker-compose.yml
File metadata and controls
43 lines (39 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
version: "3.8"
services:
postgres:
image: postgres:latest
container_name: postgres
environment: # Variáveis de ambiente para configurar o PostgreSQL
POSTGRES_USER: darlan
POSTGRES_PASSWORD: postgres
POSTGRES_DB: mydb
ports:
- "5432:5432"
volumes: # Volume para persistir os dados do banco
- postgres-data:/var/lib/postgresql/data
networks:
- desafio
api:
container_name: api-darlan
build: ./backend
ports:
- "3000:3000"
env_file: # Arquivo de variáveis de ambiente para configurar o backend
- ./backend/.env
depends_on: # a api depende do postgres para funcionar
- postgres
networks:
- desafio
app:
container_name: app-darlan
build: ./frontend
ports:
- "3007:3007"
depends_on: # o app depende da api para funcionar
- api
networks:
- desafio
networks:
desafio:
volumes:
postgres-data: