-
-
Notifications
You must be signed in to change notification settings - Fork 204
/
docker-compose.frontend.yml
102 lines (94 loc) · 3.35 KB
/
docker-compose.frontend.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
# NOTE: Generate `../kobo-env/` environment files using
# https://github.com/kobotoolbox/kobo-install. You may manually customize the
# files afterwards and stop using kobo-install if necessary.
version: '3'
services:
kpi: &django
image: kobotoolbox/kpi:2.024.33e
init: true
hostname: kpi
env_file:
- ../kobo-env/envfiles/aws.txt
- ../kobo-env/envfiles/databases.txt
- ../kobo-env/envfiles/django.txt
- ../kobo-env/envfiles/external_services.txt
- ../kobo-env/envfiles/domains.txt
- ../kobo-env/envfiles/smtp.txt
sysctls:
- net.core.somaxconn=2048
environment:
- UWSGI_MAX_REQUESTS=512
- UWSGI_WORKERS_COUNT=2
- UWSGI_CHEAPER_RSS_LIMIT_SOFT=134217728
- UWSGI_CHEAPER_WORKERS_COUNT=1
- UWSGI_HARAKIRI=120
- UWSGI_WORKER_RELOAD_MERCY=120
volumes:
- ./.vols/static/kpi:/srv/static
- ./log/kpi:/srv/logs
- ./scripts/wait_for_mongo.bash:/srv/init/wait_for_mongo.bash:ro
- ./scripts/wait_for_postgres.bash:/srv/init/wait_for_postgres.bash:ro
# Persistent storage for FileFields when S3 not used (e.g. exports, uploaded map layers)
- ./.vols/kpi_media:/srv/src/kpi/media
# Allow access to KoboCAT media uploads within KPI
- ./.vols/kobocat_media_uploads:/srv/src/kobocat/media
restart: unless-stopped
networks:
kobo-fe-network:
aliases:
- kpi.docker.container
- kpi.internal
- kobocat.docker.container
- kobocat.internal
worker:
<<: *django
command: ['bash', '/srv/src/kpi/docker/entrypoint_celery_kpi_worker.bash']
worker_low_priority:
<<: *django
command: ['bash', '/srv/src/kpi/docker/entrypoint_celery_kpi_low_priority_worker.bash']
worker_kobocat:
<<: *django
command: ['bash', '/srv/src/kpi/docker/entrypoint_celery_kobocat_worker.bash']
beat:
<<: *django
command: ['bash', '/srv/src/kpi/docker/entrypoint_celery_kobocat_worker.bash']
nginx:
image: nginx:1.26
hostname: nginx
env_file:
- ../kobo-env/envfiles/domains.txt
- ../kobo-env/envfiles/databases.txt
- ../kobo-env/envfiles/django.txt
environment:
- UWSGI_PASS_TIMEOUT=130
- TEMPLATED_VAR_REFS=$${PUBLIC_REQUEST_SCHEME} $${INTERNAL_DOMAIN_NAME} $${PUBLIC_DOMAIN_NAME} $${KOBOFORM_PUBLIC_SUBDOMAIN} $${KOBOCAT_PUBLIC_SUBDOMAIN} $${ENKETO_EXPRESS_PUBLIC_SUBDOMAIN}
volumes:
- ./.vols/static:/srv/www:ro
- ./log/nginx:/var/log/nginx
- ./.vols/kobocat_media_uploads:/media
- ./.vols/kpi_media/__public:/srv/kpi_media/__public:ro
- ./nginx/docker-entrypoint.d/30-init-kobo-nginx.sh:/docker-entrypoint.d/30-init-kobo-nginx.sh
- ./nginx/kobo-docker-scripts/:/kobo-docker-scripts
restart: unless-stopped
networks:
kobo-fe-network:
aliases:
- nginx.internal
- nginx.docker.container
enketo_express:
image: kobotoolbox/enketo-express-extra-widgets:6.2.2
init: true
hostname: enketo_express
env_file:
- ../kobo-env/envfiles/domains.txt
restart: unless-stopped
volumes:
- ../kobo-env/enketo_express/config.json:/srv/src/enketo_express/config/config.json
networks:
kobo-fe-network:
aliases:
- enketo_express.internal
- enketo_express.docker.container
networks:
kobo-fe-network:
driver: bridge