-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (42 loc) · 902 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
45 lines (42 loc) · 902 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
---
services:
api:
build:
context: .
dockerfile: Dockerfile
env_file: .env
image: adventure-api:latest
ports:
- "${FLASK_PORT:-5000}:${FLASK_PORT:-5000}"
networks:
- adventure
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${FLASK_PORT:-5000}/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
postgres:
image: postgres:17-alpine
env_file: .env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5434:5432"
networks:
- adventure
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
adventure:
driver: bridge
volumes:
postgres-data: