-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yaml
53 lines (53 loc) · 1.26 KB
/
docker-compose.prod.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
version: '3.8'
services:
web:
image: mnmyasis/sobitie:master
container_name: drf_sobitie
restart: always
command: >
sh -c "python manage.py migrate &&
python manage.py collectstatic --clear --noinput &&
gunicorn drf_sobitie.conf.wsgi:application --bind 0:8000"
volumes:
- static_value:/app/drf_sobitie/static/
- data:/app/drf_sobitie/db
- media_value:/app/drf_sobitie/media/
env_file:
- ./.env
bot:
image: mnmyasis/sobitie:master
container_name: bot_sobitie
restart: always
command: sh -c "python manage.py runbot"
depends_on:
- web
environment:
- API_ADDRESS=http://web:8000
env_file:
- ./.env
scheduler:
image: mnmyasis/sobitie:master
command: sh -c "python manage.py start-scheduler"
container_name: scheduler_sobitie
restart: always
depends_on:
- web
env_file:
- ./.env
environment:
- API_ADDRESS=web:8000
nginx:
image: nginx:1.21.3-alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- static_value:/var/html/static/
- media_value:/var/html/media/
depends_on:
- web
volumes:
static_value:
media_value:
data: