@@ -17,7 +17,7 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
1717 composer config --json extra.symfony.docker ' true'
1818
1919 if grep -q ^DATABASE_URL= .env; then
20- echo " To finish the installation please press Ctrl+C to stop Docker Compose and run: docker compose up --build -d --wait"
20+ echo ' To finish the installation please press Ctrl+C to stop Docker Compose and run: docker compose up --build -d --wait'
2121 sleep infinity
2222 fi
2323 fi
@@ -26,8 +26,12 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
2626 composer install --prefer-dist --no-progress --no-interaction
2727 fi
2828
29+ # Display information about the current project
30+ # Or about an error in project initialization
31+ php bin/console -V
32+
2933 if grep -q ^DATABASE_URL= .env; then
30- echo " Waiting for database to be ready..."
34+ echo ' Waiting for database to be ready...'
3135 ATTEMPTS_LEFT_TO_REACH_DATABASE=60
3236 until [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ] || DATABASE_ERROR=$( php bin/console dbal:run-sql -q " SELECT 1" 2>&1 ) ; do
3337 if [ $? -eq 255 ]; then
@@ -41,11 +45,11 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
4145 done
4246
4347 if [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ]; then
44- echo " The database is not up or not reachable:"
48+ echo ' The database is not up or not reachable:'
4549 echo " $DATABASE_ERROR "
4650 exit 1
4751 else
48- echo " The database is now ready and reachable"
52+ echo ' The database is now ready and reachable'
4953 fi
5054
5155 if [ " $( find ./migrations -iname ' *.php' -print -quit ) " ]; then
@@ -55,6 +59,8 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
5559
5660 setfacl -R -m u:www-data:rwX -m u:" $( whoami) " :rwX var
5761 setfacl -dR -m u:www-data:rwX -m u:" $( whoami) " :rwX var
62+
63+ echo ' PHP app ready!'
5864fi
5965
6066exec docker-php-entrypoint " $@ "
0 commit comments