-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.template.yml
85 lines (79 loc) · 2.17 KB
/
docker-compose.template.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '2.4'
services:
app:
build:
context: docker
args:
DOCKER_LIBS_IMAGE: ${DOCKER_LIBS_IMAGE}
UID: ${UID}
GID: ${GID}
image: &app "dhealth/backend"
restart: "no"
user: "${UID}:${GID}"
runtime: ${DOCKER_RUNTIME}
command: ["/bin/bash","-c","wait-for-postgres.sh && init.sh && start.sh backend"]
env_file: &envfile
- settings.conf
environment:
- PYTHONPATH="$PYTHONPATH:.%"
- RABBITMQ_BROKER_URL=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@broker:5672
- DATABASE_URL=psql://${POSTGRESQL_USERNAME}:${POSTGRESQL_PASSWORD}@db:5432/${POSTGRESQL_DATABASE} # PostgreSQL DB
- POSTGRESQL_HOST=db
ports:
- "${BACKEND_PORT}:${BACKEND_PORT}"
volumes:
- ./.config:/app/config
- ./settings.conf:/app/settings.conf
- data:${DATA_DIR}
depends_on:
- broker
- db
worker:
build: docker
image: *app
restart: "no"
user: "${UID}:${GID}"
env_file: *envfile
environment:
- PYTHONPATH="$PYTHONPATH:.%"
- RABBITMQ_BROKER_URL=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@broker:5672
- RABBITMQ_HOST=broker
- RABBITMQ_PORT=5672
- POSTGRESQL_HOST=db
- DATABASE_URL=psql://${POSTGRESQL_USERNAME}:${POSTGRESQL_PASSWORD}@db:5432/${POSTGRESQL_DATABASE} # PostgreSQL DB
command: ["start.sh","celery"]
volumes:
- ./.config:/app/config
- ./settings.conf:/app/settings.conf
- data:${DATA_DIR}
depends_on:
- broker
- db
db:
image: bitnami/postgresql:latest
restart: "no"
env_file: *envfile
environment:
- PYTHONPATH="$PYTHONPATH:.%"
volumes:
- ./.config:/app/config
- ./settings.conf:/app/settings.conf
- postgresql:/bitnami/postgresql
flower:
image: zoomeranalytics/flower:0.9.1-4.0.2
restart: "no"
env_file: *envfile
environment:
- FLOWER_BROKER=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@broker:5672
ports:
- "${FLOWER_PORT}:5555"
depends_on:
- broker
broker:
image: rabbitmq:3
env_file: *envfile
# ports:
# - 5672:5672
volumes:
postgresql:
data: