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 chown nobody:root /var/www/html -R
echo "Generating config.php file..." 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 \ --lang=$MOODLE_LANGUAGE \
--wwwroot=$SITE_URL \ --wwwroot=$SITE_URL \
--dataroot=/var/www/moodledata/ \ --dataroot=/var/www/moodledata/ \
@ -50,35 +50,35 @@ if [ ! -f /var/www/html/config.php ]; then
fi fi
# Check if the database is already installed # 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..." 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 \ --lang=$MOODLE_LANGUAGE \
--adminuser=$MOODLE_USERNAME \ --adminuser=$MOODLE_USERNAME \
--adminpass=$MOODLE_PASSWORD \ --adminpass=$MOODLE_PASSWORD \
--adminemail=$MOODLE_EMAIL \ --adminemail=$MOODLE_EMAIL \
--fullname=$DOMAIN \ --fullname="$MOODLE_SITENAME" \
--shortname=$DOMAIN \ --shortname="$MOODLE_SHORTSITENAME" \
--agree-license --agree-license
echo "Configuring settings..." 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=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=$max_input_vars /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=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=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=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=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=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=$max_input_vars /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=$max_input_vars /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=$max_input_vars /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=$max_input_vars /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=$max_input_vars /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=emailsubjectprefix --set=$MOODLE_MAIL_PREFIX
# else # else
# echo "Upgrading moodle..." # echo "Upgrading moodle..."

View File

@ -38,9 +38,10 @@ services:
container_name: isard-apps-wordpress-cli container_name: isard-apps-wordpress-cli
volumes: volumes:
*wordpress-volumes *wordpress-volumes
# user: "root"
command: > 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} 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' wp core multisite-convert;'
depends_on: depends_on:
- isard-apps-mariadb - isard-apps-mariadb
- isard-apps-wordpress - isard-apps-wordpress