Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
234 lines (221 loc) · 7.78 KB
/
Copy pathdocker-compose.yml
File metadata and controls
234 lines (221 loc) · 7.78 KB
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
name: wbs-deploy
services:
# --------------------------------------------------
# A. CORE WIKIBASE SUITE SERVICES
# --------------------------------------------------
wikibase:
image: wikibase/wikibase:8
depends_on:
mysql:
condition: service_healthy
elasticsearch:
condition: service_healthy
restart: unless-stopped
volumes:
- ./config:/config:z
- ./config/extensions:/var/www/html/extensions/extensions:z
- wikibase-image-data:/var/www/html/images
- quickstatements-data:/quickstatements/data
env_file:
- ${WBS_DIR:-.}/.wbs/version
environment:
METADATA_CALLBACK: ${METADATA_CALLBACK}
MW_ADMIN_NAME: ${MW_ADMIN_NAME}
MW_ADMIN_PASS: ${MW_ADMIN_PASS}
MW_ADMIN_EMAIL: ${MW_ADMIN_EMAIL}
MW_WG_SERVER: https://${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: https://${WIKIBASE_PUBLIC_HOST}/tools/quickstatements
WDQS_PUBLIC_ENDPOINT_URL: https://${WDQS_PUBLIC_HOST}/sparql
WDQS_PUBLIC_FRONTEND_URL: https://${WDQS_PUBLIC_HOST}
WIKIMEDIA_OAUTH_CONSUMER_TOKEN: ${WIKIMEDIA_OAUTH_CONSUMER_TOKEN:-}
WIKIMEDIA_OAUTH_SECRET_TOKEN: ${WIKIMEDIA_OAUTH_SECRET_TOKEN:-}
healthcheck:
test: curl --silent --fail localhost/wiki/Main_Page
interval: 10s
start_period: 5m
wikibase-jobrunner:
image: wikibase/wikibase:8
command: jobrunner
environment:
WIKIMEDIA_OAUTH_CONSUMER_TOKEN: ${WIKIMEDIA_OAUTH_CONSUMER_TOKEN:-}
WIKIMEDIA_OAUTH_SECRET_TOKEN: ${WIKIMEDIA_OAUTH_SECRET_TOKEN:-}
depends_on:
wikibase:
condition: service_healthy
restart: unless-stopped
volumes_from:
- wikibase
mysql:
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 OpenSearch and use default MediaWiki search functionality, remove
# the elasticsearch service and the ELASTICSEARCH_HOST variable from wikibase.
# The legacy service name is retained for existing generated LocalSettings.php files.
elasticsearch:
image: wikibase/opensearch:1
restart: unless-stopped
volumes:
# Retain this legacy volume name so existing installations keep their search data.
- elasticsearch-data:/usr/share/opensearch/data
environment:
discovery.type: single-node
bootstrap.memory_lock: "true"
DISABLE_INSTALL_DEMO_CONFIG: "true"
DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI: "true"
DISABLE_SECURITY_PLUGIN: "true"
OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
healthcheck:
test: curl --silent --fail localhost:9200
interval: 10s
start_period: 2m
wdqs:
image: wikibase/wdqs:2
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
healthcheck:
test: curl --silent --fail localhost:9999/bigdata/namespace/wdq/sparql
interval: 10s
start_period: 2m
wdqs-updater:
image: wikibase/wdqs:2
command: /runUpdate.sh
depends_on:
wdqs:
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
environment:
WIKIBASE_CONCEPT_URI: https://${WIKIBASE_PUBLIC_HOST}
wdqs-frontend:
image: wikibase/wdqs-frontend:2
restart: unless-stopped
volumes:
- ./config:/config:z
environment:
WDQS_PUBLIC_URL: https://${WDQS_PUBLIC_HOST}/sparql
WIKIBASE_PUBLIC_URL: https://${WIKIBASE_PUBLIC_HOST}/w/api.php
healthcheck:
test: curl --silent --fail localhost
interval: 10s
start_period: 2m
quickstatements:
image: wikibase/quickstatements:1
depends_on:
wikibase:
condition: service_healthy
restart: unless-stopped
volumes:
- quickstatements-data:/quickstatements/data
environment:
QUICKSTATEMENTS_PUBLIC_URL: https://${WIKIBASE_PUBLIC_HOST}/tools/quickstatements
WIKIBASE_PUBLIC_URL: https://${WIKIBASE_PUBLIC_HOST}
healthcheck:
test: curl --silent --fail localhost
interval: 10s
start_period: 2m
# --------------------------------------------------
# C. REVERSE PROXY AND SSL SERVICES
# --------------------------------------------------
# This is the reverse proxy and SSL service
traefik:
image: traefik:3
# Route Suite public hostnames through Traefik within the Docker network.
networks:
default:
aliases:
- ${WIKIBASE_PUBLIC_HOST}
- ${WDQS_PUBLIC_HOST}
command:
# traefik static configuration via command line
# enable accesslog
- "--accesslog.format=common"
# http endpoint
- "--entrypoints.web.address=:80"
# https endpoint
- "--entrypoints.websecure.address=:443"
- "--entrypoints.websecure.asdefault"
- "--entrypoints.websecure.http.tls.certresolver=letsencrypt"
# http to https redirect
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"
# ACME SSL certificate generation
- "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.letsencrypt.acme.email=${MW_ADMIN_EMAIL}"
- "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
# additionial traefik dynamic configuration via config file
- "--providers.file.filename=/etc/traefik/dynamic.yml"
# Uncomment this line to only test ssl generation first, makes sure you don't run into letsencrypt rate limits
# - "--certificatesresolvers.letsencrypt.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
# Uncomment the following line for debugging, also expose port 8080 below
# - "--api.dashboard=true"
# - "--api.insecure=true"
# - "--log.level=DEBUG"
restart: unless-stopped
ports:
- 80:80
- 443:443
# traefik dashboard
# - 8080:8080
volumes:
- ./config/traefik-dynamic.yml:/etc/traefik/dynamic.yml:ro
- traefik-letsencrypt-data:/letsencrypt
environment:
WIKIBASE_PUBLIC_HOST: ${WIKIBASE_PUBLIC_HOST}
WDQS_PUBLIC_HOST: ${WDQS_PUBLIC_HOST}
volumes:
# A. CORE WIKIBASE SUITE SERVICES DATA
wikibase-image-data:
mysql-data:
# B. EXTRA WIKIBASE SUITE SERVICES DATA
wdqs-data:
elasticsearch-data:
quickstatements-data:
# C. REVERSE PROXY AND SSL SERVICES DATA
traefik-letsencrypt-data: