-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
53 lines (52 loc) · 1.4 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
version: '3.3'
services:
thebackend_nginx:
image: nginx:latest
container_name: AIC21_Backend_nginx
restart: always
ports:
- 800:800
volumes:
- ./static/:/static/
- ./media/:/media/
- /var/log/AIC21_Backend/nginx/:/var/log/nginx/
- ./deploy/config/nginx:/etc/nginx/conf.d
depends_on:
- aic21_Backend_web
aic21_Backend_web:
build: .
container_name: AIC21_Backend_web
restart: always
depends_on:
- rabbitmq
environment:
DJANGO_SETTINGS_MODULE: "AIC21_Backend.settings.production"
command: >
sh -c "
./manage.py migrate;
./manage.py compilemessages;
./manage.py collectstatic --noinput;
gunicorn --bind=0.0.0.0:8000 --timeout=90 --preload AIC21_Backend.wsgi:application;
"
volumes:
- ./static/:/static/
- ./media/:/media/
- /var/log/AIC21_Backend:/var/log/AIC21_Backend
ports:
- 172.17.0.1:8787:8000
- 8000:8000
rabbitmq:
container_name: AIC21_Backend_rabbitmq
image: rabbitmq:3-management
environment:
- RABBITMQ_DEFAULT_USER=aic
- RABBITMQ_DEFAULT_PASS=shitWasHereBe4me
celery:
container_name: AIC21_Backend_celery
build: .
command: ["celery", "-A", "AIC21_Backend", "worker", "-l", "info", "-E", "--concurrency=10"]
depends_on:
- rabbitmq
volumes:
- ./static/:/static/
- ./media/:/media/