refactor: improve image, uniformize with API Platform (#275)

* refactor: improve image, uniformize with API Platform

* feat: remove the SKELETON arg
This commit is contained in:
Kévin Dunglas
2022-08-05 10:21:54 +02:00
committed by GitHub
parent c8b13f29c7
commit 90d3f391db
9 changed files with 78 additions and 79 deletions

View File

@@ -9,10 +9,11 @@ fi
if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
mkdir -p var/cache var/log
# The first time volumes are mounted, the project needs to be created
# Install the project the first time PHP is started
# After the installation, the following block can be deleted
if [ ! -f composer.json ]; then
CREATION=1
composer create-project "$SKELETON $SYMFONY_VERSION" tmp --stability="$STABILITY" --prefer-dist --no-progress --no-interaction --no-install
composer create-project "symfony/skeleton $SYMFONY_VERSION" tmp --stability="$STABILITY" --prefer-dist --no-progress --no-interaction --no-install
cd tmp
composer require "php:>=$PHP_VERSION"
@@ -28,6 +29,7 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
fi
if grep -q ^DATABASE_URL= .env; then
# After the installation, the following block can be deleted
if [ "$CREATION" = "1" ]; then
echo "To finish the installation please press Ctrl+C to stop Docker Compose and run: docker compose up --build"
sleep infinity