-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (51 loc) · 1.18 KB
/
docker-compose.yml
File metadata and controls
54 lines (51 loc) · 1.18 KB
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
47
48
49
50
51
52
53
54
services:
db:
image: postgres:16-alpine
container_name: app_db
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "${EXTERNAL_DB_PORT}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
timeout: 3s
retries: 10
volumes:
- db_data:/var/lib/postgresql/data
flyway:
image: flyway/flyway:10
container_name: app_flyway
depends_on:
db:
condition: service_healthy
command:
- -url=jdbc:postgresql://db:5432/${POSTGRES_DB}
- -user=${POSTGRES_USER}
- -password=${POSTGRES_PASSWORD}
- -connectRetries=20
- migrate
volumes:
- ./database/flyway/sql:/flyway/sql:ro
restart: "no"
web:
build:
context: ./backend
dockerfile: Dockerfile
container_name: app_web
env_file:
- .env
depends_on:
db:
condition: service_healthy
flyway:
condition: service_completed_successfully
ports:
- "${EXTERNAL_WEB_PORT}:8000"
volumes:
- logs:/logs
volumes:
db_data:
logs: