ENHANCEMENT: installing demo data if required
This commit is contained in:
parent
ab71b84787
commit
19b89d2787
@ -71,13 +71,8 @@ DB_PORT=$(php -r "echo parse_url('$DATABASE_URL')['port'];")
|
||||
DB_NAME=$(php -r "echo parse_url('$DATABASE_URL')['path'];")
|
||||
echo "Wait for the database."
|
||||
if [[ -z "$DB_PORT" ]]; then
|
||||
if [[ $DB_CONNECTION == "pgsql" ]]; then
|
||||
DB_PORT=5432
|
||||
elif [[ $DB_CONNECTION == "mysql" ]]; then
|
||||
if [[ $DB_CONNECTION == "mysql" ]]; then
|
||||
DB_PORT=3306
|
||||
elif [[ $DB_CONNECTION == "sqlite" ]]; then
|
||||
touch $DB_NAME
|
||||
echo "Touched!"
|
||||
fi
|
||||
fi
|
||||
if [[ -n "$DB_PORT" ]]; then
|
||||
@ -128,6 +123,12 @@ else
|
||||
echo 'Running report commands...'
|
||||
fi
|
||||
|
||||
# report commands
|
||||
if [[ $DEMO_MODE == "true" ]]; then
|
||||
echo 'Installing demo data'
|
||||
su - www-data -s "/bin/bash" -c "php $WEBCRON_ROOT/bin/console install:demodata"
|
||||
fi
|
||||
|
||||
php bin/console cache:clear
|
||||
php bin/console cache:warm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user