-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-dev.yml
114 lines (100 loc) · 2.35 KB
/
docker-compose-dev.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
version: '2'
services:
broker:
image: rabbitmq:3-management
restart: always
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
ports:
- "5672:5672"
- "8080:15672"
# db:
# image: postgres:latest
mongo:
image: mongo
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=example
nginx:
image: nginx:latest
restart: always
ports:
- "8000:8000"
volumes:
- ./code:/code
- ./config/nginx:/etc/nginx/conf.d
depends_on:
- web
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"
depends_on:
# - db
- broker
- mongo
volumes:
- ./code:/code
ports:
- "80:8000"
mainworker:
build: .
restart: always
command: celery -A remotelogger worker --autoscale=10,3 -Q celery -l INFO -E --hostname=mainworker@%h -P gevent
depends_on:
# - db
- broker
- mongo
volumes:
- ./code:/code
consumerworker:
build: .
restart: always
command: celery -A remotelogger worker --autoscale=10,3 -Q consumer -l INFO -E --hostname=consumerworker@%h -P gevent
depends_on:
# - db
- broker
- mongo
volumes:
- ./code:/code
# Flower for RabbitMQ
monitor:
image: mher/flower:latest
restart: always
logging:
# limit logs retained on host to 25MB
driver: "json-file"
options:
max-size: "500k"
max-file: "50"
ports:
- "5555:5555"
entrypoint: "flower --broker=amqp://guest:guest@broker:5672 --port=5555 --basic_auth=admin:admin"
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
environment:
- ME_CONFIG_MONGODB_ADMINUSERNAME=guest
- ME_CONFIG_MONGODB_ADMINPASSWORD=guest
redis:
image: "redis:alpine"
restart: always
# redis-commander:
# image: rediscommander/redis-commander:latest
# restart: always
# environment:
# - REDIS_HOSTS=local:redis:6379
# ports:
# - 8081:8081
# redmon:
# image: vieux/redmon
# command: redmon -r redis://redis:6379
# restart: always
# links:
# - redis
# ports:
# - 4567:4567