forked from jbeorse/sync-endpoint-default-setup
-
Notifications
You must be signed in to change notification settings - Fork 33
/
docker-compose.yml
135 lines (129 loc) · 3.25 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
version: "3.3"
services:
ldap-service:
image: odk/openldap
deploy:
replicas: 1
networks:
- ldap-network
volumes:
- ldap-vol:/var/lib/ldap
- ldap-slapd.d-vol:/etc/ldap/slapd.d
env_file:
- ldap.env
phpldapadmin:
image: odk/phpldapadmin
deploy:
replicas: 1
ports:
- "${PHP_LDAPADMIN_PORT:-40000}:443"
networks:
- ldap-network
env_file:
- ldap.env
db:
image: postgres:9.6
deploy:
replicas: 1
networks:
- db-network
volumes:
- db-vol:/var/lib/postgresql/data
env_file:
- db.env
db-bootstrap:
image: odk/db-bootstrap
deploy:
replicas: 1
restart_policy:
condition: none
placement:
constraints:
- node.role == manager
networks:
- db-network
- sync-network
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
env_file:
- db.env
- sync.env
sync:
image: odk/sync-endpoint
networks:
- ldap-network
- db-network
- sync-network
env_file:
- sync.env
# uncomment these after uncommenting the ones below in the root level configs
# configs:
# - org.opendatakit.sync.ldapcert
# - org.opendatakit.aggregate.logging.properties
secrets:
- org.opendatakit.aggregate.security.properties
- org.opendatakit.aggregate.jdbc.properties
web-ui:
image: odk/sync-web-ui
networks:
- sync-network
hostname: web-ui
configs:
- org.opendatakit.sync-web-ui.application.properties
nginx:
image: nginx:1.21.3
networks:
- sync-network
ports:
- "80:80"
- "443:443"
configs:
- source: com.nginx.sync-endpoint.conf
target: /etc/nginx/conf.d/default.conf
- source: com.nginx.sync-endpoint-locations.conf
target: /etc/nginx/conf/sync-endpoint-locations.conf
- source: com.nginx.proxy_buffer.conf
target: /etc/nginx/conf.d/proxy_buffer.conf
networks:
ldap-network:
driver: overlay
driver_opts:
encrypted: ""
internal: true
db-network:
driver: overlay
driver_opts:
encrypted: ""
internal: true
sync-network:
driver: overlay
driver_opts:
encrypted: ""
internal: true
volumes:
db-vol: # preserve db
# these 2 need to be removed together
ldap-vol: # preserve ldap db
ldap-slapd.d-vol: # preserve ldap settings
configs:
# uncomment this to import a CA certificate into the Sync service
# org.opendatakit.sync.ldapcert:
# external: true
# uncomment this to override logging configuration
# org.opendatakit.aggregate.logging.properties:
# file: ./logging.properties
org.opendatakit.sync-web-ui.application.properties:
file: ./config/web-ui/application.properties
com.nginx.sync-endpoint.conf:
file: ./config/nginx/sync-endpoint-http.conf
com.nginx.sync-endpoint-locations.conf:
file: ./config/nginx/sync-endpoint-locations.conf
com.nginx.proxy_buffer.conf:
file: ./config/nginx/proxy_buffer.conf
secrets:
org.opendatakit.aggregate.security.properties:
file: ./config/sync-endpoint/security.properties
org.opendatakit.aggregate.jdbc.properties:
file: ./config/sync-endpoint/jdbc.properties