Improved framework logic
Some checks failed
dockerbuild / Build docker image (push) Failing after 1m33s

This commit is contained in:
Chris 2024-02-06 01:31:34 +01:00
parent 966cb698f8
commit ec4dc0727a
4 changed files with 18 additions and 6 deletions

View File

@ -17,6 +17,7 @@ fi
# run framework setups # run framework setups
if [ -d /scripts/frameworks ]; then if [ -d /scripts/frameworks ]; then
cd /application
echo "[-] Calling framework setup scripts..." echo "[-] Calling framework setup scripts..."
for filename in /scripts/frameworks/*.sh; do for filename in /scripts/frameworks/*.sh; do
sh "$filename" && break sh "$filename" && break

View File

@ -4,8 +4,18 @@ if [ ! -f /application/symfony.lock ]; then
exit 1 exit 1
fi fi
echo " == Detected Symfony project" if [ -d /application/config/bolt ]; then
cd /application echo " == Detected Symfony (Bolt) project"
VARIANT=bolt
else
echo " == Detected Symfony project"
VARIANT=vanilla
fi
if [ -f /application/.symfony-preinit ]; then
echo " -> Running container-provided .symfony-preinit script"
sh /application/.symfony-preinit
fi
echo " -> Installing dependencies using composer..." echo " -> Installing dependencies using composer..."
/usr/bin/composer install --no-dev --no-cache --optimize-autoloader --no-progress -q || exit 0 /usr/bin/composer install --no-dev --no-cache --optimize-autoloader --no-progress -q || exit 0
@ -16,7 +26,7 @@ if [ -f /application/.symfony-init ]; then
fi fi
echo " -> Testing environment..." echo " -> Testing environment..."
if bin/console &>/dev/null; then if bin/console about -q; then
echo " ++ Successful" echo " ++ Successful"
else else
echo " !! Failed" echo " !! Failed"

View File

@ -5,7 +5,6 @@ if [ ! -f /application/composer.json ]; then
fi fi
echo " == Detected composer project." echo " == Detected composer project."
cd /application
echo " -> Installing dependencies using composer..." echo " -> Installing dependencies using composer..."
/usr/bin/composer install --no-dev --no-cache --optimize-autoloader --no-progress -q || exit 0 /usr/bin/composer install --no-dev --no-cache --optimize-autoloader --no-progress -q || exit 0

View File

@ -1,9 +1,11 @@
#
# Dockerfile template for Symfony based projects using PHP 8.3 # Dockerfile template for Symfony based projects using PHP 8.3
# #
# Magic files (in /application): # Magic files (in /application):
# #
# .nginx-site Override nginx site default.conf # .nginx-site Override nginx site default.conf
# .symfony-init Initializes Symfony framework install # .symfony-preinit Called before composer install
# .symfony-init Called after compose install
# #
FROM dev.noccylabs.info/noccylabs/alpine-php83-aio:latest FROM dev.noccylabs.info/noccylabs/alpine-php83-aio:latest