-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (42 loc) · 973 Bytes
/
docker-compose.yml
File metadata and controls
43 lines (42 loc) · 973 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
services:
ws:
image: realstraw/sbt:jdk11
working_dir: /acdc/ws
volumes:
- ./:/acdc/ws
environment:
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
DATA_TTL: "${DATA_TTL}"
ports:
- 9001:9000
tty: true # for easy debugging
# command:
# sbt ws/run
db:
image: postgres:16
volumes:
- acdc-postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
flyway:
image: flyway/flyway:latest-alpine
volumes:
- ./flyway/sql:/flyway/sql
environment:
FLYWAY_URL: "jdbc:postgresql://db:5432/postgres"
FLYWAY_USER: "postgres"
FLYWAY_PASSWORD: "${POSTGRES_PASSWORD}"
depends_on:
db:
condition: service_healthy
command:
migrate
volumes:
acdc-postgres-data: