-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.prod.yml
57 lines (56 loc) · 1.6 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
version: '3.8'
services:
django_1:
restart: always
env_file:
- .env
build:
context: .
dockerfile: docker/django/Dockerfile
target: prod
image: dtn_prod
command: bash -c "DJANGO_SETTINGS_MODULE=doctocnet.settings python manage.py rename_app mastodon fediverse && python manage.py migrate --noinput && python manage.py collectstatic --noinput && gunicorn doctocnet.wsgi:application --workers=${GUNICORN_WORKERS} --log-file=${GUNICORN_LOG}/gunicorn.log --log-level=${GUNICORN_LOG_LEVEL} -b '[::]:80' --worker-tmp-dir /dev/shm --timeout ${GUNICORN_TIMEOUT}"
volumes:
- ./src:/code/src
- ${STATIC_ROOT}:${STATIC_ROOT}
- ${MEDIA_ROOT}:${MEDIA_ROOT}
- ${BOT_IMAGES_PATH}:${BOT_IMAGES_PATH}
- ${GUNICORN_LOG}:${GUNICORN_LOG}
- ${GNUPGHOME}:${GNUPGHOME}
- ${DJANGO_LOG_DIR}:${DJANGO_LOG_DIR}
depends_on:
- database
- redis
working_dir: /code/src
ports:
- "${PORT_GUNICORN_1}:80"
mastodon_stream_1:
image: dtn_prod
restart: on-failure:3
mastodon_stream_2:
image: dtn_prod
restart: on-failure:3
mastodon_stream_3:
image: dtn_prod
restart: on-failure:3
mastodon_stream_4:
image: dtn_prod
restart: on-failure:3
mastodon_stream_5:
image: dtn_prod
restart: on-failure:3
mastodon_stream_6:
image: dtn_prod
restart: on-failure:3
mastodon_stream_7:
image: dtn_prod
restart: on-failure:3
celery_worker:
image: dtn_prod
profiles: ["celery"]
celery-beat:
image: dtn_prod
profiles: ["celery"]
flower:
image: dtn_prod
profiles: ["celery"]