forked from rocketseat-education/nlw-unite-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
44 lines (40 loc) · 832 Bytes
/
docker-compose.yaml
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
44
version: '3.7'
services:
postgres:
image: postgres:16.2-alpine3.19
container_name: db-passin
ports:
- "5432:5432"
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=passin
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
networks:
- passin
volumes:
- "db:/var/lib/postgresql/data"
api-passin:
build:
context: .
container_name: api-passin
ports:
- "3001:3333"
environment:
- DATABASE_URL=postgresql://admin:admin@postgres:5432/passin
- API_BASE_URL=http://localhost:3333
- PORT=3333
depends_on:
postgres:
condition: service_healthy
networks:
- passin
networks:
passin:
driver: bridge
volumes:
db: