-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
46 lines (43 loc) · 943 Bytes
/
docker-compose.yaml
File metadata and controls
46 lines (43 loc) · 943 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
44
45
46
services:
flask-app:
build:
context: ./app
dockerfile: Dockerfile
image: flask-app:1.0.0
container_name: flask-app-container
restart: always
env_file:
- ${ENV_FILE}
depends_on:
postgres:
condition: service_healthy
volumes:
- ./:/app
postgres:
image: postgres:15
container_name: postgres-container
restart: always
env_file:
- ${ENV_FILE}
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-postgres}"]
interval: 10s
timeout: 20s
retries: 5
nginx:
image: nginx:alpine
container_name: nginx-container
restart: always
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- flask-app
volumes:
pgdata:
driver: local