-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
327 lines (296 loc) · 12.7 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
version: '3.5'
volumes:
geonetwork:
geonetwork_jetty:
esdata:
esbackup:
kibanadata:
pgdata:
pglog:
pgadmindata:
cantaloupdata:
portainer_data:
previewdata:
services:
traefik:
image: traefik:v2.7
ports:
- 80:80
- 443:443
# Port 8080 is open by default on lal vm
- 8080:8080
volumes:
# First volume needed for Traefik to listen to Docker events
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./config/traefik/ssl:/etc/certs:ro
- ./config/traefik/traefik.yml:/etc/traefik/traefik.yml:ro
- ./config/traefik/traefik-config.yml:/etc/traefik/config.yml:ro
restart: always
labels:
- traefik.enable=true
- traefik.http.routers.traefik.entryPoints=websecure
- traefik.http.routers.traefik.tls=true
- traefik.http.routers.traefik.service=api@internal
- traefik.http.routers.traefik.rule=Host(`traefik.geohistoricaldata.org`, `www.traefik.geohistoricaldata.org`)
portainer:
image: portainer/portainer-ce:latest
command: -H unix:///var/run/docker.sock
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
labels:
- traefik.enable=true
- traefik.http.routers.frontend.rule=Host(`portainer.geohistoricaldata.org`, `www.portainer.geohistoricaldata.org`)
- traefik.http.routers.frontend.entrypoints=websecure
- traefik.http.services.frontend.loadbalancer.server.port=9000
- traefik.http.routers.frontend.service=frontend
- traefik.http.routers.frontend.tls=true
database:
image: postgresql-pgcron
restart: always
environment:
POSTGRES_USER: geonetwork
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: geonetwork
command: [ "postgres",
"-c", "log_statement=all",
"-c", "logging_collector=true",
"-c", "log_file_mode=0644",
"-c", "log_directory=/var/log/postgresql",
"-c", "log_filename=postgresql.log",
"-c", "shared_preload_libraries=pg_cron",
"-c", "cron.database_name=geonetwork",
"-c", "cron.log_run=off",
"-c", "cron.timezone=Europe/Paris", ]
volumes:
- pgdata:/var/lib/postgresql/data
- pglog:/var/log/postgresql
labels:
- traefik.enable=true
- traefik.http.routers.database.entryPoints=websecure
- traefik.tcp.routers.database.rule=HostSNI(`*`,`database.geohistoricaldata.org`)
- traefik.tcp.routers.database.entryPoints=database
- traefik.tcp.routers.database.service=database
- traefik.tcp.services.database.loadbalancer.server.port=5432
- traefik.http.routers.database.tls=true
pgadmin4:
image: dpage/pgadmin4:7.8
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: $PGADMIN_DEFAULT_EMAIL
PGADMIN_DEFAULT_PASSWORD: $PGADMIN_DEFAULT_PASSWORD
# SCRIPT_NAME needed for url
SCRIPT_NAME: /pgadmin
# ports need to stay, even with traefik, or it will cause a security error
ports:
- 5050:80
volumes:
- pgadmindata:/var/lib/pgadmin
labels:
- traefik.enable=true
- traefik.http.routers.pgadmin4.entryPoints=websecure
- traefik.http.routers.pgadmin4.rule=Host(`pgadmin.geohistoricaldata.org`, `www.pgadmin.geohistoricaldata.org`)
- traefik.http.routers.pgadmin4.tls=true
- traefik.http.routers.pgadmin4.middlewares=redirect-pgadmin
# regex trouvé ici : https://gist.github.com/kekru/d088be6a3fa844089ae62d80c077bb38
- traefik.http.middlewares.redirect-pgadmin.redirectregex.regex=^https:\/\/([^\/]+)\/?$$
- traefik.http.middlewares.redirect-pgadmin.redirectregex.replacement=https://$$1/pgadmin
geonetwork:
image: geonetwork:4.2.5
restart: always
environment:
DATA_DIR: /catalogue-data
JAVA_OPTS: >
-Dorg.eclipse.jetty.annotations.AnnotationParser.LEVEL=OFF
-Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true
-Xms512M -Xss512M -Xmx2G -XX:+UseConcMarkSweepGC
-Dgeonetwork.resources.dir=/catalogue-data/resources
-Dgeonetwork.data.dir=/catalogue-data
-Dgeonetwork.codeList.dir=/var/lib/jetty/webapps/geonetwork/WEB-INF/data/config/codelist
-Dgeonetwork.schema.dir=/var/lib/jetty/webapps/geonetwork/WEB-INF/data/config/schema_plugins
ES_HOST: elasticsearch
ES_PROTOCOL: http
ES_PORT: 9200
KB_URL: http://kibana:5601
GEONETWORK_DB_TYPE: postgres
GEONETWORK_DB_HOST: database
GEONETWORK_DB_PORT: 5432
GEONETWORK_DB_NAME: geonetwork
GEONETWORK_DB_USERNAME: geonetwork
GEONETWORK_DB_PASSWORD: $POSTGRES_PASSWORD
volumes:
- geonetwork:/catalogue-data
- geonetwork_jetty:/var/lib/jetty
- ./config/geonetwork/config-security-core.xml:/var/lib/jetty/webapps/geonetwork/WEB-INF/config-security/config-security-core.xml
depends_on:
- elasticsearch
- database
labels:
- traefik.enable=true
- traefik.http.routers.geonetwork.entryPoints=websecure
- traefik.http.routers.geonetwork.rule=Host(`catalog.geohistoricaldata.org`, `www.catalog.geohistoricaldata.org`)
- traefik.http.routers.geonetwork.tls=true
- traefik.http.routers.geonetwork.middlewares=redirect-geonetwork
- traefik.http.middlewares.redirect-geonetwork.redirectregex.regex=^https:\/\/([^\/]+)\/?$$
- traefik.http.middlewares.redirect-geonetwork.redirectregex.replacement=https://$$1/geonetwork
elasticsearch:
image: elasticsearch:7.17.13
restart: always
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
environment:
ES_JAVA_OPTS: "-Xms1G -Xmx1G"
discovery.type: single-node
path.repo: "/usr/share/elasticsearch/snapshots"
volumes:
- esdata:/usr/share/elasticsearch/data
- esbackup:/usr/share/elasticsearch/snapshots
kibana:
image: kibana:7.9.2
restart: always
environment:
SERVER_NAME: 'kibana'
ELASTICSEARCH_URL: http://elasticsearch:9200/
SERVER_BASEPATH: /geonetwork/dashboards
SERVER_REWRITEBASEPATH: 'false'
KIBANA_INDEX: .dashboards
XPACK_MONITORING_UI_CONTAINER_ELASTICSEARCH_ENABLED: 'true'
volumes:
- kibanadata:/usr/share/kibana/data
preview:
image: nginx
volumes:
- /data/soduco_webmap-main:/usr/share/nginx/html:ro
- ./config/directory/default.conf:/etc/nginx/conf.d/default.conf
restart: unless-stopped
labels:
- traefik.enable=true
- traefik.http.routers.preview.entryPoints=websecure
- traefik.http.routers.preview.rule=Host(`preview.geohistoricaldata.org`, `www.preview.geohistoricaldata.org`)
- traefik.http.routers.preview.tls=true
ontop:
image: ontop/ontop:5.1.1
restart: unless-stopped
environment:
ONTOP_ONTOLOGY_FILE: /opt/ontop/input/catalog.ttl
ONTOP_MAPPING_FILE: /opt/ontop/input/catalog.obda
ONTOP_PROPERTIES_FILE: /opt/ontop/input/catalog.properties
# ONTOP_PORTAL_FILE: /opt/ontop/input/university-complete.portal.toml
ONTOP_CORS_ALLOWED_ORIGINS: "*"
ONTOP_DEV_MODE: "true"
ONTOP_LAZY_INIT: "true"
volumes:
# files needed by ontop
- ./config/ontop/input:/opt/ontop/input
- ./config/ontop/jdbc:/opt/ontop/jdbc
depends_on:
- "database"
labels:
- traefik.enable=true
- traefik.http.routers.ontop.entryPoints=websecure
- traefik.http.routers.ontop.rule=Host(`rdf.geohistoricaldata.org`, `www.rdf.geohistoricaldata.org`)
- traefik.http.routers.ontop.tls=true
- traefik.http.routers.ontop.middlewares=redirect-lodview
# middleware to redirect resources to lodview.
# "(?:/lodview)*" prevent an infinite loop of /lodview
# (/.*/.{8}-.{4}-.{4}-.{4}-.{12}) match with /something/geonetwork_uuid
# example : https://rdf.geohistoricaldata.org/lodview/instantiation/e5a2978d-8b05-401d-ad0c-5b91d1f273d3.html
- traefik.http.middlewares.redirect-lodview.redirectregex.regex=^https://rdf.geohistoricaldata.org(?:/lodview)*(/.*/.{8}-.{4}-.{4}-.{4}-.{12})
- traefik.http.middlewares.redirect-lodview.redirectregex.replacement=https://rdf.geohistoricaldata.org/lodview$${1}
- traefik.http.routers.ontop-sparql.entryPoints=websecure
# Entrypoint for sparql endpoint. Necessary for lodview redirection rule to work properly
- traefik.http.routers.ontop-sparql.rule=Host(`rdf.geohistoricaldata.org`, `www.rdf.geohistoricaldata.org`) && PathPrefix(`/sparql`)
- traefik.http.routers.ontop-sparql.tls=true
# Entrypoint and middleware to rewrite Ontop responses into LodLive expected format. (Ontop's sparql endpoint doesn't take callbacks in http request)
- traefik.http.routers.ontop-rewrite.rule=Host(`rdf.geohistoricaldata.org`, `www.rdf.geohistoricaldata.org`) && Query(`callback=lodlive`)
- traefik.http.routers.ontop-rewrite.entryPoints=websecure
- traefik.http.routers.ontop-rewrite.tls=true
- traefik.http.routers.ontop-rewrite.middlewares=rewrite-lodlive
- traefik.http.middlewares.rewrite-lodlive.plugin.rewrite.lastModified=true
- traefik.http.middlewares.rewrite-lodlive.plugin.rewrite.monitor.types[0]=text/html
- traefik.http.middlewares.rewrite-lodlive.plugin.rewrite.rewrites[0].regex=(?s:(.*))
- traefik.http.middlewares.rewrite-lodlive.plugin.rewrite.rewrites[0].replacement=lodlive($${1})
lodview:
image: lodview:latest
restart: unless-stopped
labels:
- traefik.enable=true
- traefik.http.routers.lodview.entryPoints=websecure
- traefik.http.routers.lodview.rule=Host(`rdf.geohistoricaldata.org`, `www.rdf.geohistoricaldata.org`) && PathPrefix(`/lodview`)
- traefik.http.routers.lodview.tls=true
# Ontop for Solenn's work.
# Container's name must be changed to something better, like ontop_dir
ontop_rdf:
image: ontop/ontop-endpoint:4.2.0
restart: unless-stopped
environment:
ONTOP_ONTOLOGY_FILE: /opt/ontop/input/directory.rdf
ONTOP_MAPPING_FILE: /opt/ontop/input/directory.ttl
ONTOP_PROPERTIES_FILE: /opt/ontop/input/directory.properties
# ONTOP_PORTAL_FILE: /opt/ontop/input/university-complete.portal.toml
ONTOP_CORS_ALLOWED_ORIGINS: "*"
ONTOP_DEV_MODE: "true"
ONTOP_LAZY_INIT: "true"
volumes:
# files needed by ontop
- ./config/ontop_photographes/input:/opt/ontop/input
- ./config/ontop_photographes/jdbc:/opt/ontop/jdbc
labels:
- traefik.enable=true
- traefik.http.routers.ontop_rdf.entryPoints=websecure
- traefik.http.routers.ontop_rdf.rule=Host(`dir.geohistoricaldata.org`, `www.dir.geohistoricaldata.org`)
- traefik.http.routers.ontop_rdf.tls=true
cantaloupe:
image: uclalibrary/cantaloupe:5.0.5-7
restart: unless-stopped
cpus: 4
mem_limit: 16g
environment:
CANTALOUPE_ENDPOINT_ADMIN_ENABLED: "true"
CANTALOUPE_ENDPOINT_ADMIN_SECRET: $CANTALOUPE_PASSWORD
volumes:
- /data/cantaloupe:/imageroot
- ./config/cantaloupe/cantaloupe.properties:/etc/cantaloupe.properties
labels:
- traefik.enable=true
- traefik.http.routers.cantaloupe.entryPoints=websecure
- traefik.http.routers.cantaloupe.rule=Host(`iiif.geohistoricaldata.org`, `www.iiif.geohistoricaldata.org`)
- traefik.http.routers.cantaloupe.tls=true
- traefik.http.services.cantaloupe.loadbalancer.server.port=8182
geonetwork-ui:
image: geonetwork/geonetwork-ui-datahub:2.0.1
restart: unless-stopped
environment:
- GN4_API_URL=https://catalog.geohistoricaldata.org/geonetwork/srv/api
labels:
- traefik.enable=true
- traefik.http.routers.geonetwork-ui.entryPoints=websecure
- traefik.http.routers.geonetwork-ui.rule=Host(`catalog.geohistoricaldata.org`, `www.catalog.geohistoricaldata.org`) && PathPrefix(`/datahub`)
- traefik.http.routers.geonetwork-ui.tls=true
map-proxy:
image: ghcr.io/mapproxy/mapproxy/mapproxy:1.16.0-nginx
restart: unless-stopped
volumes:
- /data/config/map_proxy/mapproxy.yaml:/mapproxy/config/mapproxy.yaml:ro
- /data/config/map_proxy/cache_data:/mapproxy/config/cache_data
labels:
- traefik.enable=true
- traefik.http.routers.map-proxy.entryPoints=websecure
- traefik.http.routers.map-proxy.rule=Host(`map.geohistoricaldata.org`, `www.map.geohistoricaldata.org`)
- traefik.http.routers.map-proxy.tls=true
directory:
image: nginx
volumes:
- /data/directory:/usr/share/nginx/html:ro
- ./config/directory/default.conf:/etc/nginx/conf.d/default.conf
labels:
- traefik.enable=true
- traefik.http.routers.directory.entryPoints=websecure
- traefik.http.routers.directory.rule=Host(`directory.geohistoricaldata.org`, `www.directory.geohistoricaldata.org`)
- traefik.http.routers.directory.tls=true