-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
70 lines (64 loc) · 1.52 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
version: '3.2'
services:
db:
restart: always
image: postgres
container_name: postick
environment:
- POSTGRES_USER=postgress
- POSTGRES_PASSWORD=postgress
- POSTGRES_DB=postgress
- POSTGRES_PORT=5432
volumes:
- postgres_rulez:/var/lib/postgresql/data
ports:
- "5432:5432"
rabbitmq:
image: rabbitmq:3-management
container_name: rabbick
ports:
- "15672:15672"
- "5672:5672"
web: &web
build: .
container_name: webick
volumes:
- djelery:/djelery
command: >
sh -c "./wait-for-it.sh db:5432 &&
python manage.py makemigrations posts &&
python manage.py makemigrations accounts &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8888"
ports:
- "8888:8888"
depends_on:
- celery_worker
- celery_beater
- db
celery_worker:
build: .
container_name: celerick
volumes:
# experimental to avoid chrome crashes
- /dev/shm:/dev/shm
- djelery:/djelery
# for some reason it says there's no such option as --autoscale
# command: celery -A djelery --autoscale=10,3 worker -l INFO
command: celery -A djelery worker -l INFO
# ports: []
depends_on:
- rabbitmq
- db
celery_beater:
build: .
container_name: beaterick
volumes:
- djelery:/djelery
command: celery -A djelery beat -l INFO
depends_on:
- rabbitmq
- db
volumes:
djelery:
postgres_rulez: