Skip to content

Commit

Permalink
fix(db): make everything configuable via env, rm semantic-drilldown
Browse files Browse the repository at this point in the history
  • Loading branch information
hairmare committed Aug 6, 2023
1 parent 74f3496 commit 795c444
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
6 changes: 0 additions & 6 deletions wiki/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ RUN cd /var/www/html/ \
# Install extensions with a git based install
RUN git clone --depth=1 -b $MEDIAWIKI_EXT_BRANCH https://gerrit.wikimedia.org/r/mediawiki/extensions/ExternalData.git /var/www/html/extensions/ExternalData

# Use a version from the main branch that can be loaded with wfLoadExtension
# TODO remove after >v2.1 is release, probably in mw 1.38
RUN git clone https://github.com/wikimedia/mediawiki-extensions-SemanticDrilldown.git /var/www/html/extensions/SemanticDrilldown \
&& cd /var/www/html/extensions/SemanticDrilldown \
&& git reset --hard f59cae7785ecafc10cd42e289c06232a9d34e1fe

RUN git clone --depth=1 -b $MEDIAWIKI_EXT_BRANCH https://gerrit.wikimedia.org/r/mediawiki/extensions/PageForms.git /var/www/html/extensions/PageForms

RUN git clone --depth=1 -b $MEDIAWIKI_EXT_BRANCH https://gerrit.wikimedia.org/r/mediawiki/extensions/Arrays.git /var/www/html/extensions/Arrays
Expand Down
13 changes: 6 additions & 7 deletions wiki/LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,20 @@
$wgEmailAuthentication = true;

## Database settings
$wgDBtype = "mysql";
$wgDBserver = "mysql";
$wgDBname = "mediawiki";
$wgDBtype = getenv("MW_WG_DBTYPE") ?: "mysql";
$wgDBserver = getenv("MW_WG_DBSERVER") :? "mysql";
$wgDBname = getenv("MW_WG_DBNAME") ?: "mediawiki";
$wgDBuser = getenv('MW_WG_DBUSER');
$wgDBpassword = getenv('MW_WG_DBPASS');

# MySQL specific settings
$wgDBprefix = "";
$wgDBprefix = getenv("MW_WG_DBPREFIX") ?: "";

# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=utf8";
$wgDBTableOptions = getenv("MW_WG_DBTABLEOPTIONS") ?: "ENGINE=InnoDB, DEFAULT CHARSET=utf8";

# Experimental charset support for MySQL 5.0.
$wgDBmysql5 = true;
$wgDBmysql5 = getenv("MW_WG_DBMYSQL5") ? (bool) getenv("MW_WG_DBMYSQL5") : true;

## Shared memory settings
$wgMainCacheType = CACHE_NONE;
Expand Down Expand Up @@ -222,7 +222,6 @@
wfLoadExtension( 'SemanticMediaWiki' );
enableSemantics(getenv('MW_SMW_ENABLE_SEMANTICS_DOMAIN'));
wfLoadExtension( 'SemanticCompoundQueries' );
wfLoadExtension( 'SemanticDrilldown' );
wfLoadExtension( 'PageForms' );

# HierarchyBuilder Extension
Expand Down

0 comments on commit 795c444

Please sign in to comment.