-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (52 loc) · 1.37 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: thebackend_nginx
restart: always
ports:
- 800:800
volumes:
- ./static/:/static/
- ./media/:/media/
- /var/log/thebackend/nginx/:/var/log/nginx/
- ./deploy/config/nginx:/etc/nginx/conf.d
depends_on:
- thebackend_web
thebackend_web:
build: .
container_name: thebackend_web
restart: always
depends_on:
- rabbitmq
environment:
DJANGO_SETTINGS_MODULE: "thebackend.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 thebackend.wsgi:application;
"
volumes:
- ./static/:/static/
- ./media/:/media/
- /var/log/thebackend:/var/log/thebackend
ports:
- 172.17.0.1:8787:8000
- 8000:8000
rabbitmq:
container_name: thebackend_rabbitmq
image: rabbitmq:3-management
environment:
- RABBITMQ_DEFAULT_USER=aic
- RABBITMQ_DEFAULT_PASS=shitWasHereBe4me
celery:
container_name: thebackend_celery
build: .
command: ["celery", "-A", "thebackend", "worker", "-l", "info", "-E", "--concurrency=10"]
depends_on:
- rabbitmq
volumes:
- ./static/:/static/
- ./media/:/media/