forked from kobotoolbox/kobo-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.backend.template.yml
77 lines (72 loc) · 2.18 KB
/
docker-compose.backend.template.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
# Back-end containers template.
# The primary and secondary compose files extend this file
version: '2.2'
services:
postgres:
image: postgis/postgis:9.5-2.5
hostname: postgres
env_file:
- ../kobo-env/envfile.txt
- ../kobo-env/envfiles/databases.txt
- ../kobo-env/envfiles/aws.txt
volumes:
- ./.vols/db:/var/lib/postgresql/data
- ./backups/postgres:/srv/backups
- ./log/postgres:/srv/logs
- ./postgres:/kobo-docker-scripts
command: "bash /kobo-docker-scripts/entrypoint.sh"
restart: always
stop_grace_period: 5m
mongo:
image: mongo:3.4
hostname: mongo
environment:
- MONGO_DATA=/data/db
env_file:
- ../kobo-env/envfile.txt
- ../kobo-env/envfiles/databases.txt
- ../kobo-env/envfiles/aws.txt
volumes:
- ./.vols/mongo:/data/db
- ./backups/mongo:/srv/backups
- ./mongo:/kobo-docker-scripts
- ./log/mongo:/srv/logs
restart: always
command: "bash /kobo-docker-scripts/entrypoint.sh"
stop_grace_period: 5m
redis_main:
image: redis:3.2
env_file:
- ../kobo-env/envfile.txt
- ../kobo-env/envfiles/databases.txt
- ../kobo-env/envfiles/aws.txt
environment:
- KOBO_REDIS_SERVER_ROLE=main
volumes:
- ./redis:/kobo-docker-scripts
- ./backups/redis:/srv/backups
- ./.vols/redis_main_data/:/data/
- ./redis/redis-enketo-main.conf.tmpl:/etc/redis/redis.conf.tmpl:ro
- ./redis/entrypoint.sh:/tmp/redis/entrypoint.sh:ro
- ./log/redis_main:/var/log/redis
restart: always
stop_grace_period: 2m30s
sysctls:
- net.core.somaxconn=2048
command: "bash /tmp/redis/entrypoint.sh"
redis_cache:
image: redis:3.2
env_file:
- ../kobo-env/envfiles/databases.txt
environment:
- KOBO_REDIS_SERVER_ROLE=cache
volumes:
- ./.vols/redis_cache_data/:/data/
- ./redis/redis-enketo-cache.conf.tmpl:/etc/redis/redis.conf.tmpl:ro
- ./redis/entrypoint.sh:/tmp/redis/entrypoint.sh:ro
- ./log/redis_cache:/var/log/redis
restart: always
stop_grace_period: 2m30s
sysctls:
- net.core.somaxconn=2048
command: "bash /tmp/redis/entrypoint.sh"