-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose.yml
46 lines (41 loc) · 899 Bytes
/
docker-compose.yml
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
services:
postgres_db:
image: postgres:latest
container_name: postgres-db
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_DB=feedbackdb
volumes:
- feedback-app-data:/var/lib/postgresql/data
networks:
- feedback-app-nw
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
feedback_app:
build:
context: ./
dockerfile: Dockerfile
container_name: feedback-app
environment:
- DB_USER=postgres
- DB_HOST=postgres-db
- DB_NAME=feedbackdb
- DB_PASSWORD=password
- DB_PORT=5432
networks:
- feedback-app-nw
ports:
- "3030:3000"
depends_on:
postgres_db:
condition: service_healthy
networks:
feedback-app-nw:
driver: bridge
volumes:
feedback-app-data: