-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.yaml
More file actions
73 lines (69 loc) · 1.51 KB
/
compose.yaml
File metadata and controls
73 lines (69 loc) · 1.51 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: tokeniser
services:
app:
build:
context: .
dockerfile: Dockerfile
target: production
depends_on:
db:
condition: service_healthy
restart: true
flyway:
condition: service_completed_successfully
ports:
- "127.0.0.1:${APP_PORT}:${APP_PORT}"
environment:
- PASSPHRASE
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_HOST=db
- POSTGRES_PORT
- POSTGRES_DB
- APP_PORT
networks:
- backend
- database
db:
image: postgres:16.2-alpine3.19
restart: always
volumes:
- pgdata:/var/lib/postgresql/data
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
expose:
- 5432
networks:
- database
- operations
flyway:
image: flyway/flyway:10.13
volumes:
- ./migrations/migration:/migrations
depends_on:
- db
environment:
FLYWAY_USER: ${POSTGRES_USER}
FLYWAY_PASSWORD: ${POSTGRES_PASSWORD}
FLYWAY_URL: jdbc:postgresql://db:5432/${POSTGRES_DB}
FLYWAY_POSTGRESQL_TRANSACTIONAL_LOCK: false
FLYWAY_DRIVER: org.postgresql.Driver
FLYWAY_LOCATIONS: filesystem:/migrations
command: migrate
networks:
- operations
volumes:
pgdata:
networks:
backend:
operations:
internal: true
database:
internal: true