Compare commits

..

4 Commits

3 changed files with 20 additions and 1 deletions

View File

@@ -6,12 +6,19 @@ MAINTAINER Adrian Malacoda <adrian.malacoda@monarch-pass.net>
WORKDIR /
# Install composer
RUN apt-get -y update && apt-get install -y --no-install-recommends git zip
RUN curl --silent --show-error https://getcomposer.org/installer | php && \
chmod +x composer.phar && mv composer.phar /usr/local/bin/composer
# Install extensions
ADD add_extension.sh /add_extension.sh
RUN chmod +x add_extension.sh
RUN ./add_extension.sh Scribunto $MEDIAWIKI_BRANCH && \
./add_extension.sh VisualEditor $MEDIAWIKI_BRANCH
ADD https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh /wait-for-it
ADD setup.sh /setup.sh
RUN chmod +x /setup.sh
ADD get-variable /get-variable
RUN chmod +x setup.sh && chmod +x wait-for-it && chmod +x get-variable
CMD ["/setup.sh"]

10
get-variable Normal file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env php
<?php
define("MEDIAWIKI", 1);
define("HTML_ROOT", "/var/www/html");
function wfLoadSkin() {}
function wfLoadExtension() {}
@include HTML_ROOT . "/LocalSettings.php";
print_r($GLOBALS[$argv[1]]);

View File

@@ -5,6 +5,8 @@ HTML_ROOT=/var/www/html
# Run updater if we have an existing install
if [[ -e "$HTML_ROOT/LocalSettings.php" ]]; then
cd "$HTML_ROOT/maintenance"
DB_SERVER=$(/get-variable wgDBserver)
/wait-for-it "$DB_SERVER:3306"
php update.php
fi