-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
92 lines (87 loc) · 2.1 KB
/
docker-compose.yaml
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
version: '3.3'
services:
thebackend_nginx:
image: reg.aichallenge.ir/nginx:latest
container_name: AIC22_Backend_nginx
restart: always
ports:
- 800:800
volumes:
- ./static/:/static/
- ./media/:/media/
- /var/log/AIC22_Backend/nginx/:/var/log/nginx/
- ./deploy/config/nginx:/etc/nginx/conf.d
depends_on:
- aic22_backend_web
aic22_backend_web:
build: .
container_name: AIC22_Backend_web
restart: always
depends_on:
- rabbitmq
- postgres
- redis
environment:
DJANGO_SETTINGS_MODULE: "AIC22_Backend.settings"
command: >
sh -c "
./manage.py migrate;
./manage.py compilemessages;
./manage.py collectstatic --noinput;
gunicorn --bind=0.0.0.0:8000 --timeout=90 --workers=10 --preload AIC22_Backend.wsgi:application;
"
volumes:
- .:/code
- ./static/:/static/
- ./media/:/media/
- /var/log/AIC22_Backend:/var/log/AIC22_Backend
- cachedata:/cachec
ports:
- 8000:8000
env_file:
- .env
rabbitmq:
container_name: rabbitmq
image: reg.aichallenge.ir/rabbitmq:3-management
environment:
- RABBITMQ_DEFAULT_USER=aic
- RABBITMQ_DEFAULT_PASS=aic22challenge
ports:
- 5672:5672
celery:
container_name: celery
build: .
command: ["celery", "-A", "AIC22_Backend", "worker", "-l", "info", "-E", "--concurrency=10"]
depends_on:
- rabbitmq
links:
- rabbitmq
volumes:
- ./static/:/static/
- ./media/:/media/
- /var/log/AIC22_Backend:/var/log/AIC22_Backend
postgres:
restart: always
image: reg.aichallenge.ir/postgres:latest
volumes:
- ./media/:/media/
- pgdata:/var/lib/postgresql/data/
env_file:
- .env
ports:
- 5432:5432
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
redis:
image: reg.aichallenge.ir/redis:latest
container_name: redis
ports:
- 6379:6379
volumes:
- redisdata:/data
volumes:
pgdata:
redisdata:
cachedata: