split INSTALL_BEFORE_START into BOOT_NPM_INSTALL
Some checks failed
ci/woodpecker/push/build Pipeline failed

and BOOT_COMPOSER_INSTALL
This commit is contained in:
Ruben Momoa
2024-08-20 15:18:42 +02:00
parent 0e95ac4a55
commit 42ea0720f5
2 changed files with 16 additions and 7 deletions

View File

@@ -1,8 +1,14 @@
# the laravel version to install (empty for latest) # the laravel version to install (empty for latest)
LARAVEL_VERSION= LARAVEL_VERSION=
# weather to run "npm dev run" at boot # weather to run "npm dev" at boot
AUTO_START_NPM_DEV=true BOOT_NPM_DEV=true
# runs npm install at boot
BOOT_NPM_INSTALL=true
# runs composer install at boot
BOOT_COMPOSER_INSTALL=true
# external ports # external ports
FORWARD_LARAVEL_PORT=80 FORWARD_LARAVEL_PORT=80

View File

@@ -6,19 +6,22 @@ set -e
# init nvm # init nvm
\. $NVM_DIR/nvm.sh \. $NVM_DIR/nvm.sh
if [[ "$BOOT_NPM_INSTALL" = true ]]; then
if [[ "$INSTALL_BEFORE_START" = true ]]; then echo "npm install"
echo "composer and npm install"
composer install
npm install npm install
fi fi
if [[ "$BOOT_COMPOSER_INSTALL" = true ]]; then
echo "composer install"
composer install
fi
if [ ! -f /var/www/html/artisan ]; then if [ ! -f /var/www/html/artisan ]; then
echo "No existing Laravel project found" echo "No existing Laravel project found"
exit exit
fi fi
if [[ "$AUTO_START_NPM_DEV" = true ]]; then if [[ "$BOOT_NPM_DEV" = true ]]; then
echo "Staring npm dev" echo "Staring npm dev"
npm run dev --prefix /var/www/html & npm run dev --prefix /var/www/html &
fi fi