Revert "feat: Try to create empty database at startup, in order to avoid the error message : "The database is not up or not reachable" if database doesnt exist. (#119)"

This reverts commit cb77bd16f39a0ae8230c1efc8a811416e966af3d.
This commit is contained in:
Kévin Dunglas 2021-03-28 17:51:13 +02:00
parent 9a27dd102f
commit 4ec07393d9
No known key found for this signature in database
GPG Key ID: 9D0C5D6EEB42C445

View File

@ -30,8 +30,6 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
fi
if grep -q ^DATABASE_URL= .env; then
echo "Try to create database"
bin/console doctrine:database:create --if-not-exists --no-interaction
echo "Waiting for db to be ready..."
ATTEMPTS_LEFT_TO_REACH_DATABASE=60
until [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ] || DATABASE_ERROR=$(bin/console doctrine:query:sql "SELECT 1" 2>&1); do