From 995a92f46a9f55a7337a2cc18912866c54eb05b4 Mon Sep 17 00:00:00 2001 From: David Fichtmueller Date: Wed, 5 Jan 2022 13:12:33 +0000 Subject: [PATCH 1/3] add MW_SITE_NAME as config parameter users can now adjust the name of the wikibase instance with just the .env file and without the need to add an additional settings file in LocalSettings.d/ --- example/docker-compose.yml | 1 + example/template.env | 1 + 2 files changed, 2 insertions(+) diff --git a/example/docker-compose.yml b/example/docker-compose.yml index 841e5f792..20fd15043 100644 --- a/example/docker-compose.yml +++ b/example/docker-compose.yml @@ -41,6 +41,7 @@ services: <<: *wikibase_variables WIKIBASE_PINGBACK: MW_WG_ENABLE_UPLOADS: + MW_SITE_NAME: ${MW_SITE_NAME} wikibase_jobrunner: image: "${WIKIBASE_BUNDLE_IMAGE_NAME}" diff --git a/example/template.env b/example/template.env index 74d99a311..aeb594632 100644 --- a/example/template.env +++ b/example/template.env @@ -22,6 +22,7 @@ MW_ADMIN_NAME=admin MW_ADMIN_EMAIL=admin@example.com MW_SECRET_KEY=some-secret-key MW_WG_ENABLE_UPLOADS=false +MW_SITE_NAME=wikibase-docker ## Jobrunner Configuration MAX_JOBS=1 From 7717593731736eadb03b4047b8dd66bf4e610b2b Mon Sep 17 00:00:00 2001 From: David Fichtmueller Date: Wed, 5 Jan 2022 13:22:52 +0000 Subject: [PATCH 2/3] show wikibase name in Quickstatements until now, when creating a new batch in Quickstatements above the input field it said: "Create new command batch for" followed by an empty dropdown menu. Now the name of the wikibase instance is shown here. Though the user can not choose an alternative, but at least they know they are working on the correct wikibase instance. This is in particular important when one works on multiple different wikibase instances. --- Docker/build/QuickStatements/config.json | 1 + example/docker-compose.extra.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/Docker/build/QuickStatements/config.json b/Docker/build/QuickStatements/config.json index 04956a120..2b83e60dd 100644 --- a/Docker/build/QuickStatements/config.json +++ b/Docker/build/QuickStatements/config.json @@ -4,6 +4,7 @@ "logfile" : "/var/log/quickstatements/tool.log" , "sites" : { "${MW_SITE_NAME}" : { + "label" : "${MW_SITE_NAME}", "oauth" : { "language":"${MW_SITE_LANG}" , "project":"${MW_SITE_NAME}" , diff --git a/example/docker-compose.extra.yml b/example/docker-compose.extra.yml index 2d429a436..f9fe8c24d 100644 --- a/example/docker-compose.extra.yml +++ b/example/docker-compose.extra.yml @@ -115,6 +115,7 @@ services: - "WB_ITEM_PREFIX=Item:" - OAUTH_CONSUMER_KEY=${OAUTH_CONSUMER_KEY} - OAUTH_CONSUMER_SECRET=${OAUTH_CONSUMER_SECRET} + - MW_SITE_NAME=${MW_SITE_NAME} volumes: LocalSettings: From f3804363bf8f344a87162af3140613c78a8bc646 Mon Sep 17 00:00:00 2001 From: David Fichtmueller Date: Wed, 5 Jan 2022 13:35:29 +0000 Subject: [PATCH 3/3] make WDQS frontend name adjustable via .env file the name of the WDQS that is displayed in the frontend is now adjustalbe via the .env file. It used to be "DockerWikibaseQueryService", which is still the default in template.env. --- Docker/build/WDQS-frontend/Dockerfile | 1 - Docker/build/WDQS-frontend/custom-config.json | 2 +- example/docker-compose.extra.yml | 1 + example/template.env | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Docker/build/WDQS-frontend/Dockerfile b/Docker/build/WDQS-frontend/Dockerfile index fce93456e..0d5eb3825 100644 --- a/Docker/build/WDQS-frontend/Dockerfile +++ b/Docker/build/WDQS-frontend/Dockerfile @@ -36,7 +36,6 @@ COPY custom-config.json /templates/custom-config.json COPY default.conf /templates/default.conf ENV LANGUAGE=en\ - BRAND_TITLE=DockerWikibaseQueryService\ COPYRIGHT_URL=undefined ENTRYPOINT ["/entrypoint.sh"] diff --git a/Docker/build/WDQS-frontend/custom-config.json b/Docker/build/WDQS-frontend/custom-config.json index 756f5d22f..5c8728612 100644 --- a/Docker/build/WDQS-frontend/custom-config.json +++ b/Docker/build/WDQS-frontend/custom-config.json @@ -15,7 +15,7 @@ "urlShortener": "tinyurl" }, "brand": { - "title": "$BRAND_TITLE", + "title": "${WDQS_NAME}", "logo": "logo.svg", "favicon": "favicon.ico", "copyrightUrl": "$COPYRIGHT_URL", diff --git a/example/docker-compose.extra.yml b/example/docker-compose.extra.yml index f9fe8c24d..2392c14e0 100644 --- a/example/docker-compose.extra.yml +++ b/example/docker-compose.extra.yml @@ -45,6 +45,7 @@ services: environment: - WIKIBASE_HOST=${WIKIBASE_HOST} - WDQS_HOST=wdqs-proxy.svc + - WDQS_NAME=${WDQS_NAME} wdqs: image: "${WDQS_IMAGE_NAME}" restart: unless-stopped diff --git a/example/template.env b/example/template.env index aeb594632..89ed72773 100644 --- a/example/template.env +++ b/example/template.env @@ -41,6 +41,7 @@ WIKIBASE_PORT=80 ## WDQS-frontend Configuration WDQS_FRONTEND_HOST=wdqs-frontend.svc WDQS_FRONTEND_PORT=8834 +WDQS_NAME=DockerWikibaseQueryService ## Quickstatements Configuration # quickstatements.svc is the internal docker hostname, change this value to the public hostname