diff --git a/build/start-container.sh b/build/start-container.sh index 31ccfce..03257ff 100644 --- a/build/start-container.sh +++ b/build/start-container.sh @@ -3,6 +3,11 @@ # exit when any command fails set -e +if [ ! -f /var/www/html/artisan ]; then + echo "No existing Laravel project found" + exit +fi + # install extra packages and extensions on first boot if [[ $(id -u) -eq 0 && ! -f /etc/first_boot ]]; then if [[ -n "${EXTRA_APK_PACKAGES// /}" ]]; then @@ -26,11 +31,6 @@ if [[ "$BOOT_NPM_INSTALL" = true ]]; then npm install --cache /tmp/npm fi -if [ ! -f /var/www/html/artisan ]; then - echo "No existing Laravel project found" - exit -fi - if [[ "$BOOT_NPM_DEV" = true ]]; then echo "Staring npm dev" npm run dev --prefix /var/www/html &