add wait-for-it and get-variable, these will be used to determine the proper address of the database and wait for it to connect
This commit is contained in:
parent
7d47280ac6
commit
c33d4a1f50
@ -12,6 +12,8 @@ RUN chmod +x add_extension.sh
|
|||||||
RUN ./add_extension.sh Scribunto $MEDIAWIKI_BRANCH && \
|
RUN ./add_extension.sh Scribunto $MEDIAWIKI_BRANCH && \
|
||||||
./add_extension.sh VisualEditor $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
|
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"]
|
CMD ["/setup.sh"]
|
||||||
|
10
get-variable
Normal file
10
get-variable
Normal 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]]);
|
2
setup.sh
2
setup.sh
@ -5,6 +5,8 @@ HTML_ROOT=/var/www/html
|
|||||||
# Run updater if we have an existing install
|
# Run updater if we have an existing install
|
||||||
if [[ -e "$HTML_ROOT/LocalSettings.php" ]]; then
|
if [[ -e "$HTML_ROOT/LocalSettings.php" ]]; then
|
||||||
cd "$HTML_ROOT/maintenance"
|
cd "$HTML_ROOT/maintenance"
|
||||||
|
DB_SERVER=$(/get-variable wgDBserver)
|
||||||
|
/wait-for-it "$DB_SERVER:3306"
|
||||||
php update.php
|
php update.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user