diff --git a/entrypoint.sh b/entrypoint.sh index c114c9e..65fd879 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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