-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
247 lines (225 loc) · 7.45 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
name: wbs-deploy
services:
# --------------------------------------------------
# A. CORE WIKIBASE SUITE SERVICES
# --------------------------------------------------
wikibase:
platform: linux/amd64
image: wikibase/wikibase:3
depends_on:
mysql:
condition: service_healthy
restart: unless-stopped
ports:
- 8880:80
labels:
- "traefik.enable=true"
- "traefik.http.routers.wikibase.rule=Host(`${WIKIBASE_PUBLIC_HOST}`)"
#- "traefik.http.routers.quickstatements.entrypoints=web"
volumes:
- ./config:/config
- wikibase-image-data:/var/www/html/images
- ./config/quickstatements/data:/quickstatements/data
environment:
MW_ADMIN_NAME: ${MW_ADMIN_NAME}
MW_ADMIN_PASS: ${MW_ADMIN_PASS}
MW_ADMIN_EMAIL: ${MW_ADMIN_EMAIL}
MW_WG_SERVER: http://${WIKIBASE_PUBLIC_HOST}
DB_SERVER: mysql:3306
DB_USER: ${DB_USER}
DB_PASS: ${DB_PASS}
DB_NAME: ${DB_NAME}
ELASTICSEARCH_HOST: elasticsearch
QUICKSTATEMENTS_PUBLIC_URL: http://${QUICKSTATEMENTS_PUBLIC_HOST}
healthcheck:
test: curl --silent --fail localhost/wiki/Main_Page
interval: 10s
start_period: 5m
wikibase-jobrunner:
platform: linux/amd64
image: wikibase/wikibase:3
command: /jobrunner-entrypoint.sh
depends_on:
wikibase:
condition: service_healthy
restart: unless-stopped
volumes_from:
- wikibase
mysql:
platform: linux/amd64
image: mariadb:10.11
restart: unless-stopped
volumes:
- mysql-data:/var/lib/mysql
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASS}
MYSQL_RANDOM_ROOT_PASSWORD: yes
healthcheck:
test: healthcheck.sh --connect --innodb_initialized
start_period: 1m
interval: 20s
timeout: 5s
# --------------------------------------------------
# B. EXTRA WIKIBASE SUITE SERVICES
# --------------------------------------------------
# To disable Elasticsearch and use default MediaWiki search functionality remove
# the elasticsearch service, and the MW_ELASTIC_* vars from wikibase_variables
# at the top of this file.
elasticsearch:
platform: linux/amd64
image: wikibase/elasticsearch:1
restart: unless-stopped
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
environment:
discovery.type: single-node
ES_JAVA_OPTS: -Xms512m -Xmx512m -Dlog4j2.formatMsgNoLookups=true
healthcheck:
test: curl --silent --fail localhost:9200
interval: 10s
start_period: 2m
wdqs:
platform: linux/amd64
image: wikibase/wdqs:1
command: /runBlazegraph.sh
depends_on:
wikibase:
condition: service_healthy
restart: unless-stopped
# Set number of files ulimit high enough, otherwise blazegraph will abort with:
# library initialization failed - unable to allocate file descriptor table - out of memory
# Appeared on Docker 24.0.5, containerd 1.7.9, Linux 6.6.6, NixOS 23.11
ulimits:
nofile:
soft: 32768
hard: 32768
volumes:
- wdqs-data:/wdqs/data
ports:
- 9999:9999
healthcheck:
test: curl --silent --fail localhost:9999/bigdata/namespace/wdq/sparql
interval: 10s
start_period: 2m
wdqs-updater:
platform: linux/amd64
image: wikibase/wdqs:1
command: /runUpdate.sh
depends_on:
wdqs:
condition: service_healthy
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.services.wdqs-updater.loadbalancer.server.port=9999"
# Set number of files ulimit high enough, otherwise blazegraph will abort with:
# library initialization failed - unable to allocate file descriptor table - out of memory
# Appeared on Docker 24.0.5, containerd 1.7.9, Linux 6.6.6, NixOS 23.11
ulimits:
nofile:
soft: 32768
hard: 32768
wdqs-proxy:
platform: linux/amd64
image: wikibase/wdqs-proxy:1
depends_on:
wdqs:
condition: service_healthy
restart: unless-stopped
wdqs-frontend:
platform: linux/amd64
image: wikibase/wdqs-frontend:1
depends_on:
- wdqs-proxy
restart: unless-stopped
ports:
- 8834:80
labels:
- "traefik.enable=true"
- "traefik.http.routers.wdqs-frontend.rule=Host(`${WDQS_FRONTEND_PUBLIC_HOST}`)"
#- "traefik.http.routers.quickstatements.entrypoints=web"
#- "traefik.http.routers.wdqs-frontend.entrypoints=web"
#- "traefik.http.routers.wdqs-frontend.tls.certresolver=letsencrypt"
environment:
WDQS_HOST: wdqs-proxy
healthcheck:
test: curl --silent --fail localhost
interval: 10s
start_period: 2m
quickstatements:
platform: linux/amd64
image: wikibase/quickstatements:1
depends_on:
wikibase:
condition: service_healthy
restart: unless-stopped
ports:
- 8840:80
volumes:
- ./config/quickstatements/data:/quickstatements/data
- ./config/quickstatements/oauth.php:/var/www/html/magnustools/public_html/php/oauth.php
labels:
- "traefik.enable=true"
- "traefik.http.routers.quickstatements.rule=Host(`${QUICKSTATEMENTS_PUBLIC_HOST}`)"
#- "traefik.http.routers.quickstatements.entrypoints=web"
environment:
QUICKSTATEMENTS_PUBLIC_URL: http://${QUICKSTATEMENTS_PUBLIC_HOST}
WIKIBASE_PUBLIC_URL: http://${WIKIBASE_PUBLIC_HOST}
healthcheck:
test: curl --silent --fail localhost
interval: 10s
start_period: 2m
# --------------------------------------------------
# C. REVERSE PROXY AND SSL SERVICES
# --------------------------------------------------
traefik:
platform: linux/amd64
image: traefik:3.1
command:
# Basic setup
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entryPoints.web.address=:80"
ports:
- 80:80
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
redis:
image: "redis:alpine"
container_name: openrefine_redis
expose:
- "6379"
openrefine-wikibase:
image: c2dhunilu/onilu/enrefine-wikibase:latest
container_name: openrefine_wikibase
ports:
- 8000:8000
volumes:
- ./config/openrefine-wikibase/config.py:/openrefine-wikibase/config.py
- ./config/openrefine-wikibase/manifest.json:/openrefine-wikibase/static/manifest.json
# - ./certs/wikibase.example.com.crt:/etc/ssl/certs/wikibase.example.com.crt
# - ./certs/wikibase.example.com.key:/etc/ssl/private/wikibase.example.com.key
# environment:
# - SSL_CERT_FILE=/etc/ssl/certs/wikibase.example.com.crt
# - SSL_KEY_FILE=/etc/ssl/private/wikibase.example.com.key
depends_on:
- redis
labels:
- "traefik.enable=true" # Enable Traefik routing for this service
- "traefik.http.routers.openrefine-wikibase.rule=Host(`localhost`)" # Replace with your domain
- "traefik.http.services.openrefine-wikibase.loadbalancer.server.port=8000" # Port exposed by the container
# - "traefik.http.routers.openrefine-wikibase.entrypoints=websecure" # Use HTTPS entry point
# - "traefik.http.routers.openrefine-wikibase.tls=true" # Enable TLS for HTTPS
volumes:
# A. CORE WIKIBASE SUITE SERVICES DATA
wikibase-image-data:
mysql-data:
# B. EXTRA WIKIBASE SUITE SERVICES DATA
wdqs-data:
elasticsearch-data:
# C. REVERSE PROXY AND SSL SERVICES DATA
traefik-letsencrypt-data: