Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull wmde images #466

Merged
merged 6 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ x-redis-jobrunner: &redis-jobrunner-image
x-traefik-image: &traefik-image
traefik:v2.8
x-wikibase: &wikibase-image
ghcr.io/mardi4nfdi/docker-wikibase@sha256:1505bfcf203fe0f4c6beb7ca1081cc8927342191e136ca4cd19667a7951c8724
ghcr.io/mardi4nfdi/docker-wikibase:main
x-wdqs-image: &wdqs-image
wikibase/wdqs:0.3.40-wmde.6
ghcr.io/wmde/wikibase/wdqs:7443724965
x-wdqs-frontend-image: &wdqs-frontend-image
wikibase/wdqs-frontend:wmde.6
ghcr.io/wmde/wikibase/wdqs-frontend:7443724965
x-wdqs-proxy-image: &wdqs-proxy-image
wikibase/wdqs-proxy:wmde.6
ghcr.io/wmde/wikibase/wdqs-proxy:7443724965

x-common-variables: &wikibase_variables
DB_SERVER: mysql.svc:3306
Expand Down Expand Up @@ -271,11 +271,13 @@ services:
default:
aliases:
- wdqs-updater.svc
volumes:
- ./wdqs/runUpdate.sh:/runUpdate.sh:ro
environment:
- WIKIBASE_HOST=${MARDI_HOST}
- WIKIBASE_SCHEME=${WIKIBASE_SCHEME:-https}
- WDQS_HOST=wdqs.svc
- WDQS_PORT=9999
- WIKIBASE_HOST=${MARDI_HOST}
- WIKIBASE_SCHEME=${WIKIBASE_SCHEME:-https}
- WDQS_HOST=wdqs.svc
- WDQS_PORT=9999
labels:
- traefik.enable=false

Expand Down
15 changes: 7 additions & 8 deletions mediawiki/LocalSettings.d/Wikibase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";

$wikibaseHost = getenv('WIKIBASE_HOST');

if ($wikibaseHost === 'localhost') {
$portalHost = getenv('WIKIBASE_SCHEME') . '://localhost:' . getenv('WIKIBASE_PORT');
} else {
$portalHost = getenv('WIKIBASE_SCHEME') . '://'. $wikibaseHost;
$wikibaseHost = getenv('WIKIBASE_SCHEME') . '://'. getenv('WIKIBASE_HOST');
$portalHost = $wikibaseHost;
if (getenv('WIKIBASE_HOST') === 'localhost') {
$wikibaseHost = getenv('WIKIBASE_SCHEME') . '://wikibase.svc';
$portalHost = getenv('WIKIBASE_SCHEME') . '://localhost:' . getenv('WIKIBASE_PORT');
}

# enable linking between wikibase and content pages
Expand All @@ -22,7 +21,7 @@
$wgWBClientSettings['entitySources'] = [
'mardi_source' => [
'repoDatabase' => 'my_wiki',
'baseUri' => $portalHost . '/entity/',
'baseUri' => $wikibaseHost . '/entity/',
'entityNamespaces' => [
'item' => 120,
'property' => 122,
Expand Down Expand Up @@ -52,7 +51,7 @@
$wgWBRepoSettings['entitySources'] = [
'mardi_source' => [
'repoDatabase' => 'my_wiki',
'baseUri' => $portalHost . '/entity/',
'baseUri' => $wikibaseHost . '/entity/',
'entityNamespaces' => [
'item' => 120,
'property' => 122,
Expand Down
11 changes: 1 addition & 10 deletions mediawiki/template.env
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
## Example / Template .env file for Wikibase release pipeline docker-compose example
# WARNING: Do not add comments on the same line as env vars, as in some environments they will be included in the var!

## Image Configuration
WDQS_IMAGE_NAME=wikibase/wdqs:0.3.40-wmde.6
WDQS_FRONTEND_IMAGE_NAME=wikibase/wdqs-frontend:wmde.6
ELASTICSEARCH_IMAGE_NAME=docker-registry.wikimedia.org/releng/cirrus-elasticsearch:7.10.2-s0
QUICKSTATEMENTS_IMAGE_NAME=ghcr.io/mardi4nfdi/docker-quickstatements:master
WDQS_PROXY_IMAGE_NAME=wikibase/wdqs-proxy:wmde.6
MYSQL_IMAGE_NAME=mariadb:10.3
BACKUP_IMAGE_NAME=ghcr.io/mardi4nfdi/docker-backup:main
COMPOSE_FILE=docker-compose.yml:docker-compose-extra.yml

## Mediawiki Configuration
## Admin password
Expand Down
9 changes: 9 additions & 0 deletions wdqs/runUpdate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# This file is provided by the wikibase/wdqs docker image.

cd /wdqs || exit

# TODO env vars for entity namespaces, scheme and other settings
/wait-for-it.sh "$WIKIBASE_HOST:80" -t 300 -- \
physikerwelt marked this conversation as resolved.
Show resolved Hide resolved
/wait-for-it.sh "$WDQS_HOST:$WDQS_PORT" -t 300 -- \
./runUpdate.sh -h http://"$WDQS_HOST":"$WDQS_PORT" -- --wikibaseUrl "$WIKIBASE_SCHEME"://"$WIKIBASE_HOST":80 --conceptUri "$WIKIBASE_SCHEME"://"$WIKIBASE_HOST" --entityNamespaces "$WDQS_ENTITY_NAMESPACES"
Loading