Updated moodle install and wordpress auto saml plugin activation

root 2021-09-29 13:02:19 +02:00
parent d3d88ab17a
commit cb96478a2d
2 changed files with 17 additions and 16 deletions

View File

@ -23,7 +23,7 @@ if [ ! -f /var/www/html/config.php ]; then
chown nobody:root /var/www/html -R
echo "Generating config.php file..."
ENV_VAR='var' php -d max_input_vars=1000 /var/www/html/admin/cli/install.php \
ENV_VAR='var' php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/install.php \
--lang=$MOODLE_LANGUAGE \
--wwwroot=$SITE_URL \
--dataroot=/var/www/moodledata/ \
@ -50,35 +50,35 @@ if [ ! -f /var/www/html/config.php ]; then
fi
# Check if the database is already installed
if php -d max_input_vars=1000 /var/www/html/admin/cli/isinstalled.php ; then
if php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/isinstalled.php ; then
echo "Installing database..."
php -d max_input_vars=1000 /var/www/html/admin/cli/install_database.php \
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/install_database.php \
--lang=$MOODLE_LANGUAGE \
--adminuser=$MOODLE_USERNAME \
--adminpass=$MOODLE_PASSWORD \
--adminemail=$MOODLE_EMAIL \
--fullname=$DOMAIN \
--shortname=$DOMAIN \
--fullname="$MOODLE_SITENAME" \
--shortname="$MOODLE_SHORTSITENAME" \
--agree-license
echo "Configuring settings..."
# php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=slasharguments --set=0
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=pathtophp --set=/usr/bin/php
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=pathtodu --set=/usr/bin/du
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=pathtophp --set=/usr/bin/php
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=pathtodu --set=/usr/bin/du
# php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=aspellpath --set=/usr/bin/aspell
# php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=pathtodot --set=/usr/bin/dot
# php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=pathtogs --set=/usr/bin/gs
# php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=pathtopython --set=/usr/bin/python3
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=enableblogs --set=0
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=enableblogs --set=0
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=smtphosts --set=$SMTP_HOST:$SMTP_PORT
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=smtpuser --set=$SMTP_USER
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=smtppass --set=$SMTP_PASSWORD
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=smtpsecure --set=$SMTP_PROTOCOL
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=noreplyaddress --set=$MOODLE_MAIL_NOREPLY_ADDRESS
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=emailsubjectprefix --set=$MOODLE_MAIL_PREFIX
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=smtphosts --set=$SMTP_HOST:$SMTP_PORT
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=smtpuser --set=$SMTP_USER
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=smtppass --set=$SMTP_PASSWORD
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=smtpsecure --set=$SMTP_PROTOCOL
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=noreplyaddress --set=$MOODLE_MAIL_NOREPLY_ADDRESS
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=emailsubjectprefix --set=$MOODLE_MAIL_PREFIX
# else
# echo "Upgrading moodle..."

View File

@ -38,9 +38,10 @@ services:
container_name: isard-apps-wordpress-cli
volumes:
*wordpress-volumes
# user: "root"
command: >
bash -c 'wp core install --path="/var/www/html" --url=wp.${DOMAIN} --title="${TITLE}" --admin_user=${WORDPRESS_ADMIN_USER} --admin_password=${WORDPRESS_ADMIN_PASSWORD} --admin_email=${SMTP_USER}
&& wp core multisite-convert'
bash -c 'wp core install --path="/var/www/html" --url=wp.${DOMAIN} --title="${TITLE}" --admin_user=${WORDPRESS_ADMIN_USER} --admin_password=${WORDPRESS_ADMIN_PASSWORD} --admin_email=${SMTP_USER};
wp core multisite-convert;'
depends_on:
- isard-apps-mariadb
- isard-apps-wordpress