docker-alpine-php83-aio/config/frameworks/10-symfony.sh
Christopher Vagnetoft ec4dc0727a
Some checks failed
dockerbuild / Build docker image (push) Failing after 1m33s
Improved framework logic
2024-02-06 01:31:34 +01:00

36 lines
824 B
Bash

#!/bin/sh
if [ ! -f /application/symfony.lock ]; then
exit 1
fi
if [ -d /application/config/bolt ]; then
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..."
/usr/bin/composer install --no-dev --no-cache --optimize-autoloader --no-progress -q || exit 0
if [ -f /application/.symfony-init ]; then
echo " -> Running container-provided .symfony-init script"
sh /application/.symfony-init
fi
echo " -> Testing environment..."
if bin/console about -q; then
echo " ++ Successful"
else
echo " !! Failed"
fi
exit 0