Small entrypoint fixes
This commit is contained in:
parent
56cfaac694
commit
b581d320eb
3 changed files with 17 additions and 5 deletions
|
@ -17,7 +17,9 @@ ENV \
|
||||||
MEDIAWIKI_ADMIN_PASS="password" \
|
MEDIAWIKI_ADMIN_PASS="password" \
|
||||||
WG_DB_TYPE="sqlite" \
|
WG_DB_TYPE="sqlite" \
|
||||||
WG_DB_SERVER="" \
|
WG_DB_SERVER="" \
|
||||||
|
WG_DB_PORT="" \
|
||||||
WG_DB_NAME="my_wiki" \
|
WG_DB_NAME="my_wiki" \
|
||||||
|
WG_DB_USER="mediawiki" \
|
||||||
WG_DB_PASSWORD="password" \
|
WG_DB_PASSWORD="password" \
|
||||||
WG_DB_PREFIX="" \
|
WG_DB_PREFIX="" \
|
||||||
WG_DB_MWSCHEMA="" \
|
WG_DB_MWSCHEMA="" \
|
||||||
|
|
|
@ -10,7 +10,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
|
||||||
## Uncomment this to disable output compression
|
## Uncomment this to disable output compression
|
||||||
# $wgDisableOutputCompression = true;
|
# $wgDisableOutputCompression = true;
|
||||||
|
|
||||||
$wgSitename = getenv("WG_SITE_NAME");
|
$wgSitename = getenv("WG_SITENAME");
|
||||||
$wgMetaNamespace = "Meta";
|
$wgMetaNamespace = "Meta";
|
||||||
|
|
||||||
$wgScriptPath = getenv("WG_SCRIPT_PATH");
|
$wgScriptPath = getenv("WG_SCRIPT_PATH");
|
||||||
|
|
|
@ -3,8 +3,8 @@ set -euo pipefail
|
||||||
|
|
||||||
cd /var/www/html/
|
cd /var/www/html/
|
||||||
|
|
||||||
# The install script doesn't want there to be a LocalSettings.php file
|
# The install script doesn't want there to be an existing LocalSettings.php
|
||||||
echo Killing LocalSettings.php
|
echo Deleting LocalSettings.php
|
||||||
echo
|
echo
|
||||||
|
|
||||||
rm /var/www/html/LocalSettings.php
|
rm /var/www/html/LocalSettings.php
|
||||||
|
@ -12,14 +12,24 @@ rm /var/www/html/LocalSettings.php
|
||||||
echo Install.php
|
echo Install.php
|
||||||
echo
|
echo
|
||||||
|
|
||||||
php maintenance/install.php --dbtype "${MEDIAWIKI_DB_TYPE}" --dbname "${MEDIAWIKI_DB_NAME}" --dbuser "${MEDIAWIKI_DB_USER}" --dbport "${MEDIAWIKI_DB_PORT}" --dbpass "${MEDIAWIKI_DB_PASSWORD}" --scriptpath "/var/www/html/" --dbserver "${MEDIAWIKI_DB_HOST}" --pass "${MEDIAWIKI_ADMIN_PASS}" --dbpath "${MEDIAWIKI_DATABASE_DIR}" "${MEDIAWIKI_SITE_NAME}" "${MEDIAWIKI_ADMIN_USER}"
|
php maintenance/install.php \
|
||||||
|
--dbtype "${WG_DB_TYPE}" \
|
||||||
|
--dbname "${WG_DB_NAME}" \
|
||||||
|
--dbuser "${WG_DB_USER}" \
|
||||||
|
--dbport "${WG_DB_PORT}" \
|
||||||
|
--dbpass "${WG_DB_PASSWORD}" \
|
||||||
|
--scriptpath "/var/www/html/" \
|
||||||
|
--dbserver "${WG_DB_SERVER}" \
|
||||||
|
--pass "${MEDIAWIKI_ADMIN_PASS}" \
|
||||||
|
--dbpath "${WG_DATABASE_DIR}" \
|
||||||
|
"${WG_SITENAME}" "${MEDIAWIKI_ADMIN_USER}"
|
||||||
|
|
||||||
# Now, we're going to replace the LocalSettings.php file that install.php just generated with ours
|
# Now, we're going to replace the LocalSettings.php file that install.php just generated with ours
|
||||||
# This way, update.php will work.
|
# This way, update.php will work.
|
||||||
rm /var/www/html/LocalSettings.php
|
rm /var/www/html/LocalSettings.php
|
||||||
ln -s /var/www/conf/LocalSettings.php /var/www/html/LocalSettings.php
|
ln -s /var/www/conf/LocalSettings.php /var/www/html/LocalSettings.php
|
||||||
|
|
||||||
echo LocalSettings.php restored
|
echo LocalSettings.php linked
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo Creating localstore
|
echo Creating localstore
|
||||||
|
|
Loading…
Reference in a new issue