-
Notifications
You must be signed in to change notification settings - Fork 30
/
docker-compose.yml
51 lines (48 loc) · 1.65 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
42
43
44
45
46
47
48
49
50
51
version: '3'
services:
dataact-broker-db:
container_name: dataact-broker-db
image: postgres:13.8-alpine
restart: on-failure:3 # 3 max attempt, and then it will stop restarting
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: root
POSTGRES_DB: data_broker
ports:
- "5435:5432"
# init-container, that runs its "init" task and terminates
# The task is to run migrations on the other container/service: dataact-broker-db
# This leverages the pip dependencies built into the dataact-broker-backend image in order to run alembic
dataact-broker-init-db:
container_name: dataact-broker-init-db
#init: true # init not compatible with docker compose earlier than v3.7, which Travis CI requires
image: dataact-broker-backend
build:
context: ./
depends_on:
- dataact-broker-db
command: /bin/sh -x -c "sleep 9s; cd ./dataactcore; alembic upgrade head"
volumes:
- ./:/data-act/backend
dataact-broker-backend:
container_name: dataact-broker-backend
image: dataact-broker-backend
build:
context: ./
depends_on:
- dataact-broker-db
restart: on-failure:3 # 3 max attempt, and then it will stop restarting
command: /bin/sh -c "sleep 9s; python dataactbroker/app.py"
ports:
- "9999:9999"
volumes:
- ./:/data-act/backend
dataact-broker-validator:
container_name: dataact-broker-validator
image: dataact-broker-backend
restart: on-failure:5 # 5 max attempt, and then it will stop restarting
command: /bin/sh -c "sleep 17s; python dataactvalidator/app.py"
ports:
- "8889:8889"
volumes:
- ./:/data-act/backend