Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions webserver/scripts/install-joomla.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,16 @@ fi

# Setup configuration file
sudo cp $(dirname $0)/configuration.php $root/configuration.php
sed -i "s/{SITE}/$site/g" $root/configuration.php
sed -i "s/{DBHOST}/$dbHost/g" $root/configuration.php
sed -i "s/{DBNAME}/$dbName/g" $root/configuration.php
sed -i "s/{SMTPHOST}/$smtpHost/g" $root/configuration.php
sed -i "s/{PATH}/${root//\//\\/}/g" $root/configuration.php
# prevent the use of inplace sed -i as it creates unreadable tmp file inside the Docker container on Intel macOS
sed "s/{SITE}/$site/g" > $root/configuration.tmp && mv $root/configuration.tmp $root/configuration.php
sed "s/{DBHOST}/$dbHost/g" > $root/configuration.tmp && mv $root/configuration.tmp $root/configuration.php
sed "s/{DBNAME}/$dbName/g" > $root/configuration.tmp && mv $root/configuration.tmp $root/configuration.php
sed "s/{SMTPHOST}/$smtpHost/g" > $root/configuration.tmp && mv $root/configuration.tmp $root/configuration.php
sed "s/{PATH}/${root//\//\\/}/g" > $root/configuration.tmp && mv $root/configuration.tmp $root/configuration.php

# Joomla 3 needs error reporting simple because of PHP 8.2 deprecations
if [ ! -f $root/package.json ]; then
sed -i "s/error_reporting = 'maximum'/error_reporting = 'simple'/g" $root/configuration.php
sed "s/error_reporting = 'maximum'/error_reporting = 'simple'/g" > $root/configuration.tmp && mv $root/configuration.tmp $root/configuration.php
fi

# Define install folder
Expand All @@ -72,7 +73,7 @@ fi

if [[ -z $dbHost || $dbHost == 'mysql'* ]]; then
echo "Installing Joomla with mysql"
sed -i "s/{DBDRIVER}/mysqli/g" $root/configuration.php
sed "s/{DBDRIVER}/mysqli/g" > $root/configuration.tmp && mv $root/configuration.tmp $root/configuration.php

echo "Waiting for database server"
while ! mysqladmin ping -u root -proot -h $dbHost --silent > /dev/null; do
Expand Down Expand Up @@ -104,7 +105,7 @@ fi

if [[ $dbHost == 'postgres'* ]]; then
echo "Installing Joomla with postgres"
sed -i "s/{DBDRIVER}/pgsql/g" $root/configuration.php
sed "s/{DBDRIVER}/pgsql/g" > $root/configuration.tmp && mv $root/configuration.tmp $root/configuration.php
export PGPASSWORD=root

# Clear existing connections
Expand Down