-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (36 loc) · 1.01 KB
/
docker-compose.yml
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
version: "3.9"
x-db-password: &db-password ${POSTGRES_PASSWORD:-db_password}
x-db-user: &db-user ${POSTGRES_USER:-db_user}
services:
postgres:
image: "postgres:15.1"
environment:
POSTGRES_PASSWORD: *db-password
POSTGRES_USER: *db-user
ports:
- "5432:5432"
restart: always
postgres_migrator:
depends_on:
- postgres
image: "flyway/flyway:9.14"
command: -url=jdbc:postgresql://postgres:5432/${POSTGRES_USER:-db_user} -user=${POSTGRES_USER:-db_user} -password=${POSTGRES_PASSWORD:-db_password} -connectRetries=60 migrate
volumes:
- "./migrations/:/flyway/sql"
zio-api:
depends_on:
postgres:
condition: service_started
postgres_migrator:
condition: service_completed_successfully
image: 'zio-api:latest'
ports:
- "8080:8080"
environment:
POSTGRES_PASSWORD: *db-password
POSTGRES_USER: *db-user
volumes:
- "./config/local.conf:/opt/docker/etc/api.conf"
networks:
default:
name: zio-api-network