Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

Commit

Permalink
docker-compose: reconstruction de l'image wikibase pour prendre en co…
Browse files Browse the repository at this point in the history
…mpte les modifications du LocalSettings.php.template

ce qui, avec une mise en cache des images construites, doit permettre de lancer le serveur assez rapidement
(sauf au premier lancement donc) et simplifie énormement la customisation
  • Loading branch information
maxlath committed Sep 25, 2019
1 parent 6ab51be commit ee01b86
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 93 deletions.
6 changes: 3 additions & 3 deletions docker-compose.yml
Expand Up @@ -7,15 +7,15 @@ version: '3'

services:
wikibase:
image: wikibase/wikibase:1.33-bundle
build:
context: ./wikibase/1.33/bundle
dockerfile: Dockerfile
links:
- mysql
ports:
- "8181:80"
volumes:
- mediawiki-images-data:/var/www/html/images
# surcharge du LocalSettings.php specifique au FNE
- ./wikibase/LocalSettings.php:/var/www/html/LocalSettings.php:ro
depends_on:
- mysql
- elasticsearch
Expand Down
2 changes: 2 additions & 0 deletions env/dot_wb_env
Expand Up @@ -2,7 +2,9 @@ MW_ADMIN_NAME=<Some user to be created>
MW_ADMIN_PASS=<The password for the above user>
MW_ADMIN_EMAIL=<Email of the above user>
MW_WG_SECRET_KEY=<A random secret key>

DB_NAME=<DB name matching the MySQL service>
DB_USER=<Username matching the MySQL service>
DB_PASS=<Password matching the MySQL service>

WG_SERVER=<full public host>
10 changes: 7 additions & 3 deletions wikibase/1.33/base/LocalSettings.php.template
Expand Up @@ -18,9 +18,9 @@ ${DOLLAR}wgDBpassword = "${DB_PASS}";
## Logs
## Save these logs inside the container
${DOLLAR}wgDebugLogGroups = [
'resourceloader' => '/var/log/mediawiki/resourceloader.log',
'exception' => '/var/log/mediawiki/exception.log',
'error' => '/var/log/mediawiki/error.log',
'resourceloader' => '/var/log/mediawiki/resourceloader.log',
'exception' => '/var/log/mediawiki/exception.log',
'error' => '/var/log/mediawiki/error.log',
];

## Site Settings
Expand All @@ -45,6 +45,10 @@ ${DOLLAR}wgSecretKey = "${MW_WG_SECRET_KEY}";
# Set this to 1 year to avoid any changes being removed from the RC table over a shorter period of time.
${DOLLAR}wgRCMaxAge = 365 * 24 * 3600;

# Allows to force the URL to be HTTPS from environment variables as it is not auto-discoverd
# See https://github.com/abes-esr/poc-fne/issues/205
$wgServer = $_ENV['WG_SERVER'];

wfLoadSkin( 'Vector' );

## Wikibase
Expand Down
4 changes: 0 additions & 4 deletions wikibase/1.33/bundle/extra-install.sh
Expand Up @@ -3,7 +3,3 @@
php /var/www/html/extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php
php /var/www/html/extensions/CirrusSearch/maintenance/forceSearchIndex.php --skipParse
php /var/www/html/extensions/CirrusSearch/maintenance/forceSearchIndex.php --skipLinks --indexOnSkip

php /var/www/html/extensions/OAuth/maintenance/createOAuthConsumer.php --approve --callbackUrl $QS_PUBLIC_SCHEME_HOST_AND_PORT/api.php \
--callbackIsPrefix true --user Admin --name QuickStatements --description QuickStatements --version 1.0.1 \
--grants createeditmovepage --grants editpage --grants highvolume --jsonOnSuccess > /quickstatements/data/qs-oauth.json
83 changes: 0 additions & 83 deletions wikibase/LocalSettings.php

This file was deleted.

0 comments on commit ee01b86

Please sign in to comment.