forked from arachnys/cabot
-
Notifications
You must be signed in to change notification settings - Fork 14
/
docker-compose.yaml
68 lines (61 loc) · 1.58 KB
/
docker-compose.yaml
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
version: '2.1'
services:
web:
env_file:
- conf/development.env
build: .
image: cabot:web
command: python manage.py runserver 0.0.0.0:5001
ports:
- "${CABOT_PORT_MAPPING:-5001:5001}" # publish port 5001 by default so browsers can connect to localhost:5001
volumes:
- .:/code
links:
- rabbitmq
- db_psql
- db_mysql
worker:
env_file:
- conf/development.env
image: cabot:web
# adding -B also starts celery beat (the task scheduler) with the worker
# both the worker and beat will log to the LOG_FILE env var (/var/log/cabot.log by default)
command: >
bash -euc "dockerize -wait tcp://db_psql:5432 -timeout 60s;
dockerize -wait tcp://root:test@db_mysql:3306 -timeout 60s;
python manage.py celery worker -B -A cabot --loglevel=DEBUG --concurrency=16 -Ofair"
volumes:
- .:/code
links:
- rabbitmq
- db_psql
- db_mysql
depends_on:
- db_psql
- db_mysql
- rabbitmq
rabbitmq:
image: rabbitmq
db_psql:
image: postgres:11
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
db_mysql:
image: mysql:5.6
environment:
- MYSQL_ROOT_PASSWORD=test
wait_psql:
image: cabot:web
command: dockerize -wait tcp://db_psql:5432 -timeout 60s
depends_on:
- db_psql
wait_mysql:
image: cabot:web
command: dockerize -wait tcp://root:test@db_mysql:3306 -timeout 60s
depends_on:
- db_mysql
wait_rabbitmq:
image: cabot:web
command: dockerize -wait tcp://rabbitmq:5672 -timeout 60s
depends_on:
- rabbitmq