forked from getodk/central
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
109 lines (109 loc) · 2.58 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
version: "3"
services:
postgres:
image: "postgres:9.6"
volumes:
- /var/lib/postgresql/data
environment:
POSTGRES_USER: odk
POSTGRES_PASSWORD: odk
POSTGRES_DATABASE: odk
restart: always
mail:
image: "itsissa/namshi-smtp:4.92-8.deb10u6"
volumes:
- ./files/dkim/config:/etc/exim4/_docker_additional_macros:ro
- ./files/dkim/rsa.private:/etc/exim4/domain.key:ro
environment:
- MAILNAME=${DOMAIN}
restart: always
service:
build:
context: .
dockerfile: service.dockerfile
depends_on:
- secrets
- postgres
- mail
- pyxform
- enketo
volumes:
- secrets:/etc/secrets
- /data/transfer:/data/transfer
environment:
- DOMAIN=${DOMAIN}
- HTTPS_PORT=${HTTPS_PORT:-443}
- SYSADMIN_EMAIL=${SYSADMIN_EMAIL}
command: [ "./wait-for-it.sh", "postgres:5432", "--", "./start-odk.sh" ]
restart: always
logging:
driver: local
nginx:
build:
context: .
dockerfile: nginx.dockerfile
depends_on:
- service
- enketo
environment:
- SSL_TYPE=${SSL_TYPE:-letsencrypt}
- DOMAIN=${DOMAIN}
- CERTBOT_EMAIL=${SYSADMIN_EMAIL}
ports:
- "${HTTP_PORT:-80}:80"
- "${HTTPS_PORT:-443}:443"
healthcheck:
test: [ "CMD-SHELL", "nc -z localhost 80 || exit 1" ]
restart: always
logging:
driver: local
options:
max-file: "30"
pyxform:
image: 'ghcr.io/getodk/pyxform-http:v1.10.1.1'
restart: always
secrets:
volumes:
- secrets:/etc/secrets
build:
context: .
dockerfile: secrets.dockerfile
command: './generate-secrets.sh'
enketo:
volumes:
- secrets:/etc/secrets
build:
context: .
dockerfile: enketo.dockerfile
restart: always
depends_on:
- secrets
- enketo_redis_main
- enketo_redis_cache
environment:
- DOMAIN=${DOMAIN}
- SUPPORT_EMAIL=${SYSADMIN_EMAIL}
- HTTPS_PORT=${HTTPS_PORT:-443}
enketo_redis_main:
image: redis:5
volumes:
- ./files/enketo/redis-enketo-main.conf:/usr/local/etc/redis/redis.conf:ro
- enketo_redis_main:/data
command:
- redis-server
- /usr/local/etc/redis/redis.conf
restart: always
enketo_redis_cache:
image: redis:5
volumes:
- ./files/enketo/redis-enketo-cache.conf:/usr/local/etc/redis/redis.conf:ro
- enketo_redis_cache:/data
command:
- redis-server
- /usr/local/etc/redis/redis.conf
restart: always
volumes:
transfer:
enketo_redis_main:
enketo_redis_cache:
secrets: