-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
182 lines (169 loc) · 4.46 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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
version: "3"
services:
backend:
container_name: backend
# image: server_image
build: ./backend
volumes:
- ./backend/logs:/home/backend/logs
env_file:
- backend/.env
ports:
- "8000:8000"
# command: uvicorn main:app --workers $BACKEND_WORKERS --port $BACKEND_PORT --host 0.0.0.0
restart: unless-stopped
redis:
image: redis:latest
container_name: redis
expose:
- 6379
# ports:
# - "6379:6379"
volumes:
- redis:/data
command: redis-server --save 20 1 --loglevel warning
restart: unless-stopped
celery_default:
container_name: celery_default
# image: server_image
build: ./backend
working_dir: /home/backend
volumes:
- ./backend:/home/backend
depends_on:
redis:
condition: service_started
backend:
condition: service_started
command: python3 -m celery -A backend worker -Q default -n default_worker --concurrency=1 -l DEBUG
restart: unless-stopped
celery_asr_tts:
container_name: celery_asr_tts
# image: server_image
build: ./backend
working_dir: /home/backend
volumes:
- ./backend:/home/backend
depends_on:
redis:
condition: service_started
backend:
condition: service_started
command: python3 -m celery -A backend worker -Q asr_tts -n asr_tts_worker --concurrency=4 -l DEBUG
restart: unless-stopped
celery_nmt:
container_name: celery_nmt
# image: server_image
build: ./backend
working_dir: /home/backend
volumes:
- ./backend:/home/backend
depends_on:
redis:
condition: service_started
backend:
condition: service_started
command: python3 -m celery -A backend worker -Q nmt -n nmt_worker --concurrency=1 -l DEBUG --pool threads
restart: unless-stopped
celery_newsletter:
container_name: celery_newsletter
# image: server_image
build: ./backend
working_dir: /home/backend
volumes:
- ./backend:/home/backend
depends_on:
redis:
condition: service_started
backend:
condition: service_started
command: python3 -m celery -A backend worker -Q newsletter -n newsletter_worker --concurrency=1 -l DEBUG
restart: unless-stopped
celery_ekstep_asr:
container_name: celery_ekstep_asr
# image: server_image
build: ./backend
working_dir: /home/backend
volumes:
- ./backend:/home/backend
depends_on:
redis:
condition: service_started
backend:
condition: service_started
command: python3 -m celery -A backend worker -Q ekstep_asr -n ekstep_asr_worker --concurrency=1 -l DEBUG
restart: unless-stopped
celery_beat:
container_name: celery_beat
# image: server_image
build: ./backend
working_dir: /home/backend
volumes:
- ./backend:/home/backend
depends_on:
redis:
condition: service_started
backend:
condition: service_started
command: python3 -m celery -A backend beat -l DEBUG
restart: unless-stopped
flower:
container_name: flower
# image: server_image
build: ./backend
env_file:
- backend/.env
working_dir: /home/backend
volumes:
- ./backend:/home/backend
ports:
- "5555:5555"
depends_on:
redis:
condition: service_started
backend:
condition: service_started
celery_default:
condition: service_started
celery_asr_tts:
condition: service_started
celery_nmt:
condition: service_started
# celery_voiceover:
# condition: service_started
celery_beat:
condition: service_started
command: python3 -m celery -A backend flower --loglevel=info
restart: unless-stopped
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
volumes:
nginx_conf:
# external: true
letsencrypt_certs:
# external: true
certbot_acme_challenge:
static_volume:
redis:
driver: local