-
Notifications
You must be signed in to change notification settings - Fork 14
/
docker-compose.yml
462 lines (426 loc) · 9.99 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
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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
version: '2'
services:
proxy-base:
image: nginx:stable
environment:
DIGITRANSIT_SUBSCRIPTION_KEY:
ports:
- '80:80'
- '443:443'
logging:
driver: "gelf"
options:
gelf-address: "udp://localhost:5000"
tag: "proxy"
volumes:
- './certs/:/certs:z'
- './webapp/resources/public/:/usr/share/nginx/html:z'
- './nginx/nginx.conf:/etc/nginx/nginx.conf:z'
- './nginx/htpasswd:/etc/nginx/htpasswd:z'
proxy:
extends:
service: proxy-base
links:
- mapproxy
- backend
- logstash
- kibana
- legacy-api
- geoserver
volumes:
- './nginx/proxy.conf:/etc/nginx/templates/default.conf.template:z'
# Only difference is added X-Robots-tag 'noindex'
# to make search engines ignore dev-site(s)
proxy-dev:
extends:
service: proxy-base
links:
- mapproxy
#- backend
- logstash
- kibana
- legacy-api
- geoserver
volumes:
- './nginx/proxy_dev.conf:/etc/nginx/templates/default.conf.template:z'
proxy-local:
extends:
service: proxy-base
links:
- mapproxy
- logstash
- kibana
- geoserver
volumes:
- './nginx/proxy_local.conf:/etc/nginx/templates/default.conf.template:z'
htpasswd:
image: lipas/htpasswd
build:
context: ./htpasswd
dockerfile: Dockerfile
mapproxy:
image: vharmain/mapproxy
hostname: mapproxy
logging:
driver: "gelf"
options:
gelf-address: "udp://localhost:5000"
tag: "mapproxy"
environment:
PRODUCTION: 'true'
PROCESSES: 4
THREADS: 10
MAPPROXY_USER_ID: 1000
MAPPROXY_GROUP_ID: 1000
TZ: Europe/Helsinki
MML_AUTH:
entrypoint: ["/bin/bash", "/start.sh"]
command: /start.sh
volumes:
- './mapproxy:/lipas:z'
- './mapproxy/start.sh:/start.sh:z'
- 'mapproxy_cache:/mapproxy/cache_data'
# No need to expose
#ports:
# - '8080:8080'
backend-base:
image: clojure:lein
working_dir: /usr/src/app
logging:
driver: "gelf"
options:
gelf-address: "udp://localhost:5000"
tag: "backend"
environment:
DB_HOST:
DB_PORT:
DB_NAME:
DB_USER:
DB_PASSWORD:
SMTP_HOST:
SMTP_USER:
SMTP_PASS:
SMTP_FROM:
SEARCH_HOST:
SEARCH_USER:
SEARCH_PASS:
OLD_LIPAS_URL:
OLD_LIPAS_USER:
OLD_LIPAS_PASS:
ADMIN_PASSWORD:
ACCESSIBILITY_REGISTER_BASE_URL:
ACCESSIBILITY_REGISTER_SYSTEM_ID:
ACCESSIBILITY_REGISTER_SECRET_KEY:
OSRM_CAR_URL:
OSRM_BICYCLE_URL:
OSRM_FOOT_URL:
MAILCHIMP_CAMPAIGN_FOLDER_ID:
MAILCHIMP_LIST_ID:
MAILCHIMP_NEWSLETTER_INTEREST_ID:
MAILCHIMP_API_URL:
MAILCHIMP_API_KEY:
MML_COVERAGE_URL:
MML_API_KEY:
UTP_CMS_API_URL:
UTP_CMS_API_USER:
UTP_CMS_API_PASS:
UTP_WEBHOOK_SOURCE_ENV:
UTP_WEBHOOK_URL:
UTP_WEBHOOK_SUBSCRIPTION_KEY:
UTP_WEBHOOK_TOKEN_CLIENT_ID:
UTP_WEBHOOK_TOKEN_CLIENT_SECRET:
UTP_WEBHOOK_TOKEN_URL:
AWS_ACCESS_KEY_ID:
AWS_SECRET_ACCESS_KEY:
AWS_REGION:
AWS_S3_BUCKET:
AWS_S3_BUCKET_PREFIX:
PTV_API_URL:
PTV_TOKEN_URL:
PTV_SERVICE_URL:
PTV_SERVICE_LOCATION_URL:
PTV_ORG_ID:
PTV_API_USERNAME:
PTV_API_PASSWORD:
OPEN_AI_API_KEY:
LEIN_SILENT: 'true'
volumes:
- './webapp/:/usr/src/app:z'
- 'mvn_cache:/root/.m2'
backend:
extends:
service: backend-base
command: java -Duser.timezone=UTC -Xmx2G -jar backend.jar
ports:
- '8091:8091'
- '7888:7888'
links:
- postgres
- elasticsearch
- osrm-car
- osrm-bicycle
- osrm-foot
backend-dev:
extends:
service: backend-base
command: lein ring server-headless
hostname: backend
ports:
- '8091:8091'
- '7888:7888'
links:
- postgres
- elasticsearch
- osrm-car
- osrm-bicycle
- osrm-foot
backend-build:
extends:
service: backend-base
command: bash -c 'lein uberjar && cp /tmp/uberjar/backend.jar .'
backend-migrate:
extends:
service: backend-base
command: lein migratus migrate
links:
- postgres
backend-migrate-data:
extends:
service: backend-base
environment:
ICE_STADIUMS_CSV_URL:
SWIMMING_POOLS_CSV_URL:
entrypoint: lein run -m lipas.migrate-data
links:
- postgres
backend-tests:
extends:
service: backend-base
command: lein test
links:
- postgres
- elasticsearch
backend-seed:
extends:
service: backend-base
command: lein run -m lipas.seed
links:
- postgres
backend-maintenance:
extends:
service: backend-base
logging:
options:
tag: "maintenance"
entrypoint: lein run -m lipas.maintenance
links:
- postgres
backend-index-search:
extends:
service: backend-base
logging:
options:
tag: "search-indexer"
entrypoint: lein run -m lipas.search-indexer
links:
- postgres
- elasticsearch
- osrm-foot
- osrm-bicycle
- osrm-car
integrations:
extends:
service: backend-base
logging:
options:
tag: "integrations"
entrypoint: lein trampoline run -m lipas.integrator
links:
- postgres
- elasticsearch
worker:
extends:
service: backend-base
restart: unless-stopped
logging:
options:
tag: "worker"
entrypoint: lein trampoline run -m lipas.worker
links:
- postgres
- elasticsearch
- osrm-foot
- osrm-bicycle
- osrm-car
node-base:
image: node:16-alpine
working_dir: /usr/src/app
logging:
driver: "gelf"
options:
gelf-address: "udp://localhost:5000"
tag: "backend-node"
volumes:
- './webapp/:/usr/src/app:z'
frontend-npm-deps:
extends:
service: node-base
command: npm install --quiet
frontend-build:
extends:
service: backend-base
command: lein run -m shadow.cljs.devtools.cli release app
headless-chrome:
image: robcherry/docker-chromedriver
privileged: true
environment:
CHROMEDRIVER_WHITELISTED_IPS: '' # Allow any source
ports:
- '4444:4444'
integration-tests:
extends:
service: backend-base
command: lein test :integration
links:
- headless-chrome
- proxy
postgres:
image: mdillon/postgis:10
environment:
DB_PORT: 5432
DB_NAME:
DB_USER:
DB_PASSWORD:
DB_SUPERUSER:
# Official Postgres image uses this variable
POSTGRES_PASSWORD: ${DB_SUPERUSER_PASSWORD}
ports:
- '5432:5432'
volumes:
- pgdata:/var/lib/postgresql/data
- ./db:/docker-entrypoint-initdb.d:z
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0
ports:
- '9200:9200'
- '9300:9300'
environment:
- transport.host=127.0.0.1
- xpack.security.enabled=false
- xpack.monitoring.enabled=false
- xpack.ml.enabled=false
- xpack.graph.enabled=false
- xpack.watcher.enabled=false
- discovery.type=single-node
- "ES_JAVA_OPTS=${ES_JAVA_OPTS}"
volumes:
- esdata:/usr/share/elasticsearch/data
logstash:
image: docker.elastic.co/logstash/logstash:7.12.0
ports:
- "5000:5000/udp"
environment:
- xpack.monitoring.enabled=false
links:
- elasticsearch
volumes:
- "./logstash/pipeline:/usr/share/logstash/pipeline:z"
kibana:
image: docker.elastic.co/kibana/kibana:7.12.0
ports:
- "5601:5601"
environment:
- xpack.monitoring.enabled=false
links:
- elasticsearch
volumes:
- "./kibana/kibana.yml:/usr/share/kibana/config/kibana.yml:z"
legacy-api-base:
image: openjdk:23
logging:
driver: "gelf"
options:
gelf-address: "udp://localhost:5000"
tag: "legacy-api"
environment:
SEARCH_HOST:
SEARCH_USER:
SEARCH_PASS:
LEGACY_DB_URL:
LEGACY_DB_USER:
LEGACY_DB_PASS:
legacy-api:
extends:
service: legacy-api-base
command: java -jar /lipas-api.jar 9999
ports:
- "9999:9999"
links:
- elasticsearch
- postgres
volumes:
- "./legacy-api.jar:/lipas-api.jar:z"
legacy-api-worker:
extends:
service: legacy-api-base
command: java -jar /worker.jar
links:
- elasticsearch
- postgres
volumes:
- "./legacy-api-worker.jar:/worker.jar:z"
geoserver:
image: kartoza/geoserver:2.21.1
logging:
driver: "gelf"
options:
gelf-address: "udp://localhost:5000"
tag: "geoserver"
ports:
- "8888:8080"
environment:
GEOSERVER_DATA_DIR: "/my_data_dir"
GEOWEBCACHE_CACHE_DIR: "/my_data_dir/gwc"
GEOSERVER_ADMIN_PASSWORD:
GEOSERVER_ADMIN_USER:
INITIAL_MEMORY: ${GEOSERVER_INITIAL_MEMORY}
MAXIMUM_MEMORY: ${GEOSERVER_MAX_MEMORY}
links:
- postgres
volumes:
- "./geoserver/data_dir:/my_data_dir:z"
elasticdump:
image: elasticdump/elasticsearch-dump
links:
- elasticsearch
volumes:
- "./data:/data:z"
osrm-car:
image: osrm/osrm-backend
restart: unless-stopped
command: osrm-routed --max-table-size 3000 --algorithm mld /data/finland-latest.osrm
volumes:
- "./osrm/car:/data:z"
ports:
- "5001:5000"
osrm-bicycle:
image: osrm/osrm-backend
restart: unless-stopped
command: osrm-routed --max-table-size 3000 --algorithm mld /data/finland-latest.osrm
volumes:
- "./osrm/bicycle:/data:z"
ports:
- "5002:5000"
osrm-foot:
image: osrm/osrm-backend
restart: unless-stopped
command: osrm-routed --max-table-size 3000 --algorithm mld /data/finland-latest.osrm
volumes:
- "./osrm/foot:/data:z"
ports:
- "5003:5000"
volumes:
pgdata: {}
esdata: {}
mvn_cache: {}
mapproxy_cache: {}