Load interwiki tables, + tidying
This commit is contained in:
parent
8bcccca575
commit
db6595c52c
|
@ -20,9 +20,9 @@ Based on [`mediawiki-ve-bundle`][mediawiki-ve].
|
|||
abra secret_generate db_root_password v1
|
||||
abra secret_generate mediawiki_secret_key v1 "pwgen -n 64 1"
|
||||
```
|
||||
7. `abra deploy`
|
||||
8. Create an initial admin user:
|
||||
`abra run app php /var/www/html/maintenance/createAndPromote.php YourUsername YourPassword`
|
||||
6. `abra deploy`
|
||||
7. Create an initial admin user:
|
||||
`abra run app php /var/www/html/maintenance/createAndPromote.php --sysop YourUsername YourPassword`
|
||||
|
||||
## SimpleSAMLphp
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@ services:
|
|||
- simplesaml:/var/simplesamlphp/
|
||||
- simplesaml_log:/var/simplesamlphp/log
|
||||
networks:
|
||||
- internal
|
||||
- proxy
|
||||
entrypoint: /docker-entrypoint.simplesaml.sh
|
||||
#entrypoint: ["tail", "-f", "/dev/null"]
|
||||
|
|
|
@ -31,10 +31,17 @@ init_db() {
|
|||
fi
|
||||
|
||||
PASSWORD=$(cat /run/secrets/db_password)
|
||||
# FIXME 3wc: replace with sql.php, not sure how to parse output:
|
||||
# stdClass Object
|
||||
#(
|
||||
# [TOTAL] => 58
|
||||
#)
|
||||
TABLE_COUNT=$(mysql -u "${DB_USER}" --password="$PASSWORD" -h "${DB_HOST}" "${DB_NAME}" -e "SELECT count(*) AS TOTAL FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'mediawiki';" -N -B)
|
||||
|
||||
if [[ "${TABLE_COUNT}" == "0" ]]; then
|
||||
mysql -u "${DB_USER}" --password="$PASSWORD" -h "${DB_HOST}" "${DB_NAME}" < /var/www/html/maintenance/tables.sql
|
||||
php /var/www/html/maintenance/sql.php < /var/www/html/maintenance/tables.sql
|
||||
php /var/www/html/maintenance/sql.php < /var/www/html/maintenance/interwiki.sql
|
||||
# FIXME run createAndPromote.php with $ADMIN_USERNAME
|
||||
else
|
||||
php /var/www/html/maintenance/update.php
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue