-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-base.yml
283 lines (223 loc) · 7.61 KB
/
docker-compose-base.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
version: "2.1"
services:
# ---------------------------------
# Databases
# ---------------------------------
postgres-base:
image: postgres:10-alpine
environment:
PGUSER: postgres
healthcheck:
test: pg_isready
interval: 5s
timeout: 3s
retries: 30
minio-base:
image: minio/minio
environment:
MINIO_ACCESS_KEY: ${MINIO_STORAGE_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_STORAGE_SECRET_KEY}
command: minio server --quiet --address minio:9090 /data
# ---------------------------------
# NGINX
# ---------------------------------
nginx-base:
image: nginx:alpine
volumes:
# local setup
- ./local-setup/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./local-setup/nginx/sites-enabled:/etc/nginx/sites-enabled
# nginx log files
- ./.persistent_data/nginx:/var/log/nginx
# static folders per container
- ./.persistent_data/static:/static
ports:
- 80:80
healthcheck:
test: nginx -t
interval: 5s
timeout: 3s
retries: 30
# ---------------------------------
# Aether Kernel
# ---------------------------------
kernel-base:
image: ehealthafrica/aether-kernel:${AETHER_VERSION:-alpha}
environment:
CSRF_COOKIE_DOMAIN: aether.local
DJANGO_SECRET_KEY: ${KERNEL_DJANGO_SECRET_KEY}
LOGGING_FORMATTER: verbose
HTML_SELECT_CUTOFF: 10
PROFILING_ENABLED: "true"
BUCKET_NAME: kernel
DJANGO_STORAGE_BACKEND: minio
MINIO_STORAGE_ACCESS_KEY: ${MINIO_STORAGE_ACCESS_KEY}
MINIO_STORAGE_SECRET_KEY: ${MINIO_STORAGE_SECRET_KEY}
MINIO_STORAGE_ENDPOINT: minio:9090
MINIO_STORAGE_MEDIA_USE_PRESIGNED: null
MINIO_STORAGE_MEDIA_URL: http://minio:9090/kernel
MINIO_STORAGE_AUTO_CREATE_MEDIA_BUCKET: "true"
MINIO_STORAGE_AUTO_CREATE_MEDIA_POLICY: "true"
APP_NAME: Aether Kernel
APP_URL: /kernel
STATIC_URL: /static/kernel/
MULTITENANCY: ${MULTITENANCY}
DEFAULT_REALM: ${DEFAULT_REALM}
REALM_COOKIE: ${REALM_COOKIE}
ADMIN_USERNAME: ${KERNEL_ADMIN_USERNAME}
ADMIN_PASSWORD: ${KERNEL_ADMIN_PASSWORD}
ADMIN_TOKEN: ${KERNEL_ADMIN_TOKEN}
KERNEL_READONLY_DB_USERNAME: ${KERNEL_READONLY_DB_USERNAME}
KERNEL_READONLY_DB_PASSWORD: ${KERNEL_READONLY_DB_PASSWORD}
DB_NAME: aether-kernel
PGHOST: db # This matches the DB service name
PGPASSWORD: ${KERNEL_DB_PASSWORD}
PGPORT: 5432
PGUSER: postgres
# Export
EXPORT_CSV_ESCAPE: "\\"
EXPORT_CSV_QUOTES: "\""
EXPORT_CSV_SEPARATOR: ","
EXPORT_DATA_FORMAT: split
EXPORT_HEADER_CONTENT: labels
EXPORT_HEADER_SEPARATOR: /
EXPORT_HEADER_SHORTEN: "no"
WEB_SERVER_PORT: 8100
volumes:
- ./.persistent_data/backups/kernel:/backups
- ./.persistent_data/static/kernel:/var/www/static
command: start
# ---------------------------------
# Aether ODK module
# ---------------------------------
odk-base:
image: ehealthafrica/aether-odk:${AETHER_VERSION:-alpha}
environment:
CSRF_COOKIE_DOMAIN: aether.local
DJANGO_SECRET_KEY: ${ODK_DJANGO_SECRET_KEY}
LOGGING_FORMATTER: verbose
HTML_SELECT_CUTOFF: 10
PROFILING_ENABLED: "true"
BUCKET_NAME: odk
DJANGO_STORAGE_BACKEND: minio
MINIO_STORAGE_ACCESS_KEY: ${MINIO_STORAGE_ACCESS_KEY}
MINIO_STORAGE_SECRET_KEY: ${MINIO_STORAGE_SECRET_KEY}
MINIO_STORAGE_ENDPOINT: minio:9090
MINIO_STORAGE_MEDIA_USE_PRESIGNED: null
MINIO_STORAGE_MEDIA_URL: http://minio:9090/odk
MINIO_STORAGE_AUTO_CREATE_MEDIA_BUCKET: "true"
MINIO_STORAGE_AUTO_CREATE_MEDIA_POLICY: "true"
APP_NAME: Aether ODK
APP_URL: /odk
STATIC_URL: /static/odk/
MULTITENANCY: ${MULTITENANCY}
DEFAULT_REALM: ${DEFAULT_REALM}
REALM_COOKIE: ${REALM_COOKIE}
ADMIN_USERNAME: ${ODK_ADMIN_USERNAME}
ADMIN_PASSWORD: ${ODK_ADMIN_PASSWORD}
ADMIN_TOKEN: ${ODK_ADMIN_TOKEN}
AETHER_KERNEL_TOKEN: ${KERNEL_ADMIN_TOKEN}
AETHER_KERNEL_URL: http://aether.local/kernel
DB_NAME: aether-odk
PGHOST: db # This matches the DB service name
PGPASSWORD: ${ODK_DB_PASSWORD}
PGPORT: 5432
PGUSER: postgres
WEB_SERVER_PORT: 8102
volumes:
- ./.persistent_data/backups/odk:/backups
- ./.persistent_data/static/odk:/var/www/static
command: start
# ---------------------------------
# Aether UI
# ---------------------------------
ui-base:
image: ehealthafrica/aether-ui:${AETHER_VERSION:-alpha}
environment:
CSRF_COOKIE_DOMAIN: aether.local
DJANGO_SECRET_KEY: ${UI_DJANGO_SECRET_KEY}
LOGGING_FORMATTER: verbose
HTML_SELECT_CUTOFF: 10
PROFILING_ENABLED: "true"
APP_NAME: Aether
STATIC_URL: /static/ui/
MULTITENANCY: ${MULTITENANCY}
DEFAULT_REALM: ${DEFAULT_REALM}
REALM_COOKIE: ${REALM_COOKIE}
ADMIN_USERNAME: ${UI_ADMIN_USERNAME}
ADMIN_PASSWORD: ${UI_ADMIN_PASSWORD}
AETHER_KERNEL_TOKEN: ${KERNEL_ADMIN_TOKEN}
AETHER_KERNEL_URL: http://aether.local/kernel
DB_NAME: aether-ui
PGHOST: db # This matches the DB service name
PGPASSWORD: ${UI_DB_PASSWORD}
PGPORT: 5432
PGUSER: postgres
WEB_SERVER_PORT: 8104
volumes:
- ./.persistent_data/backups/ui:/backups
- ./.persistent_data/static/ui:/var/www/static
command: start
# ---------------------------------
# Gather
# ---------------------------------
gather-base:
image: gather
build:
context: .
dockerfile: app/Dockerfile
stdin_open: true
tty: true
environment:
CSRF_COOKIE_DOMAIN: gather.local
DJANGO_SECRET_KEY: ${GATHER_DJANGO_SECRET_KEY}
LOGGING_FORMATTER: verbose
HTML_SELECT_CUTOFF: 10
PROFILING_ENABLED: "true"
APP_NAME: Gather
MULTITENANCY: ${MULTITENANCY}
DEFAULT_REALM: ${DEFAULT_REALM}
REALM_COOKIE: ${REALM_COOKIE}
ADMIN_USERNAME: ${GATHER_ADMIN_USERNAME}
ADMIN_PASSWORD: ${GATHER_ADMIN_PASSWORD}
EXTERNAL_APPS: aether-kernel,aether-odk
AETHER_KERNEL_TOKEN: ${KERNEL_ADMIN_TOKEN}
AETHER_KERNEL_URL: http://aether.local/kernel
AETHER_ODK_TOKEN: ${ODK_ADMIN_TOKEN}
AETHER_ODK_URL: http://aether.local/odk
DB_NAME: gather
PGHOST: db # This matches the DB service name
PGPASSWORD: ${GATHER_DB_PASSWORD}
PGPORT: 5432
PGUSER: postgres
EXPORT_MAX_ROWS_SIZE: 2500
WEB_SERVER_PORT: 8105
# Use this value with "HMR" otherwise you can comment it out
WEBPACK_STATS_FILE: /code/gather/assets/bundles/webpack-stats.json
volumes:
- ./app:/code
- ./.persistent_data/backups/gather:/backups
- ./.persistent_data/static/gather:/var/www/static
command: start_dev
# ---------------------------------
# Gather Assets
# ---------------------------------
gather-assets-base:
image: gather-assets
build: ./app/gather/assets
stdin_open: true
tty: true
volumes:
#################################################
# WARNING #
# do not include the root folder as volume or #
# `node_modules` folder will not be available #
#################################################
# include all folders and root files manually :'(
- ./app/gather/assets/apps:/code/apps
- ./app/gather/assets/bundles:/code/bundles
- ./app/gather/assets/conf:/code/conf
- ./app/gather/assets/css:/code/css
- ./app/gather/assets/tests:/code/tests
- ./app/gather/assets/package.json:/code/package.json
command: start_dev