-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
75 lines (68 loc) · 1.77 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: '2'
services:
broker:
image: rabbitmq:3
restart: always
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
ports:
- "5672:5672"
# volumes:
# - ./data/rabbitmq:/var/lib/rabbitmq:rw
# - ./config/rabbitmq/definitions.json:/opt/definitions.json:ro
# - ./config/rabbitmq/rabbitmq.config:/etc/rabbitmq/rabbitmq.config:ro
redis:
image: redis:alpine
restart: always
# volumes:
# - ./data/redis/:/data:rw
mongo:
image: mongo
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=example
volumes:
- ./data/mongo/db:/data/db:rw
- ./data/mongo/configdb:/data/configdb:rw
nginx:
image: nginx:latest
restart: always
ports:
- "8000:8000"
volumes:
- ./code:/code
- ./config/nginx:/etc/nginx/conf.d
web:
build: .
restart: always
command: bash -c "python manage.py makemigrations && python manage.py migrate && uwsgi --http :8000 --http-websockets --gevent 1000 --master --ini uwsgi.ini"
volumes:
- ./code:/code
ports:
- "8080:8000"
depends_on:
- broker
- redis
- mongo
- nginx
mainworker:
build: .
restart: always
command: celery -A remotelogger worker --autoscale=3,1 -Q celery -l INFO -E --hostname=mainworker@%h -P gevent --uid celery --gid celery
volumes:
- ./code:/code
depends_on:
- broker
- redis
consumerworker:
build: .
restart: always
command: celery -A remotelogger worker --autoscale=8,4 -Q consumer -l INFO -E --hostname=consumerworker@%h -P gevent --uid celery --gid celery
volumes:
- ./code:/code
depends_on:
- broker
- redis
- mongo