From e4e5dc6524cc87b88cb268ddeeea4d4ef903bf89 Mon Sep 17 00:00:00 2001 From: Ruben Momoa Date: Fri, 30 Aug 2024 14:12:46 +0200 Subject: [PATCH] check of a laravel project before doing other things --- build/start-container.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 &