-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-prod.yml
119 lines (109 loc) · 2.89 KB
/
docker-compose-prod.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
112
113
114
115
116
117
118
119
version: '3.3'
services:
nginx:
build: ./nginx
image: evgeniy-khyst/nginx
env_file:
- ./config.env
volumes:
- nginx_conf:/etc/nginx/sites
- letsencrypt_certs:/etc/letsencrypt
- certbot_acme_challenge:/var/www/certbot
- ./vhosts:/etc/nginx/vhosts
- static_volume:/backend/static
ports:
- "80:80"
- "443:443"
restart: unless-stopped
certbot:
build: ./certbot
image: evgeniy-khyst/certbot
env_file:
- ./config.env
volumes:
- letsencrypt_certs:/etc/letsencrypt
- certbot_acme_challenge:/var/www/certbot
cron:
build: ./cron
image: evgeniy-khyst/cron
environment:
COMPOSE_PROJECT_NAME: "${COMPOSE_PROJECT_NAME}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./:/workdir:ro
restart: unless-stopped
web:
build: ./backend
command: gunicorn --bind 0.0.0.0:8000 --workers 16 anudesh_backend.wsgi --timeout 300
volumes:
- ./backend/:/usr/src/backend/
- static_volume:/usr/src/backend/static
ports:
- 8000:8000
depends_on:
- redis
redis:
container_name: redis
image: "redis"
ports:
- 6379:6379
celery:
container_name: celery-default
restart: always
build: ./backend
command: celery -A anudesh_backend.celery worker -Q default --concurrency=2 --loglevel=info
volumes:
- ./backend/:/usr/src/backend/
depends_on:
- redis
- web
# This is the additional queue which contains the low-priority celery tasks. We can adjust the concurrency and workers alloted to this container.
celery2:
container_name: celery-low-priority
restart: always
build: ./backend
command: celery -A anudesh_backend.celery worker -Q functions --concurrency=2 --loglevel=info
volumes:
- ./backend/:/usr/src/backend/
depends_on:
- redis
- web
# Celery beats - for scheduling daily e-mails
celery-beat:
build: ./backend
command: celery -A anudesh_backend.celery beat --loglevel=info
volumes:
- ./backend/:/usr/src/backend
depends_on:
- redis
- web
celery3:
container_name: celery-reports
restart: always
build: ./backend
command: celery -A anudesh_backend.celery worker -Q reports --concurrency=2 --loglevel=info
volumes:
- ./backend/:/usr/src/backend/
depends_on:
- redis
- web
flower:
container_name: flower
restart: always
build: ./backend
command: celery -A shoonya_backend.celery flower --conf="./usr/src/backend/anudesh_backend/flowerconfig.py" --basic-auth="${FLOWER_USERNAME}:${FLOWER_PASSWORD}"
ports:
- "5555:5555"
volumes:
- ./backend/:/usr/src/backend/
- logs_vol:/logs
depends_on:
- redis
- web
volumes:
nginx_conf:
external: true
letsencrypt_certs:
external: true
certbot_acme_challenge:
static_volume: