-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-entrypoint.sh
29 lines (19 loc) · 1.21 KB
/
docker-entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
#Set WAIT_HOST value according DB_HOST and DB_PORT values.
export WAIT_HOSTS=$DB_HOST:$DB_PORT
/wait
#If doesn't exist tao configuration file means system is not installed.
if [ ! -f "/var/www/html/config/generis.conf.php" ]; then
echo "TAO platform is not installed yet. We proceed to install it."
echo "Entering to TAO installer. We recommend to use default installation values if you are using the docker compose example."
#Increase max execution time on fly to install system.
sudo -u www-data php -d max_execution_time=300 /var/www/html/tao/scripts/taoInstall.php -vvv --file_path $FILE_PATH --db_driver $DB_DRIVER --db_host $DB_HOST --db_name $DB_NAME --db_user $DB_USER --db_pass $DB_PASSWORD --module_namespace $URL/first.rdf --module_url $URL --user_login $USER --user_pass $PASSWORD -e taoCe
#Change DEBUG_MODE as false in order to have system in production mode.
export search="define('DEBUG_MODE', true);"
export replace="define('DEBUG_MODE', false);"
sed -i "s/$search/$replace/" /var/www/html/config/generis.conf.php
echo "TAO platform was successully installed. TAO running at $URL."
else
echo "Systems ready. TAO running at $URL."
fi
exec "$@"