split INSTALL_BEFORE_START into BOOT_NPM_INSTALL
Some checks failed
ci/woodpecker/push/build Pipeline failed
Some checks failed
ci/woodpecker/push/build Pipeline failed
and BOOT_COMPOSER_INSTALL
This commit is contained in:
10
.env.example
10
.env.example
@@ -1,8 +1,14 @@
|
||||
# the laravel version to install (empty for latest)
|
||||
LARAVEL_VERSION=
|
||||
|
||||
# weather to run "npm dev run" at boot
|
||||
AUTO_START_NPM_DEV=true
|
||||
# weather to run "npm dev" at boot
|
||||
BOOT_NPM_DEV=true
|
||||
|
||||
# runs npm install at boot
|
||||
BOOT_NPM_INSTALL=true
|
||||
|
||||
# runs composer install at boot
|
||||
BOOT_COMPOSER_INSTALL=true
|
||||
|
||||
# external ports
|
||||
FORWARD_LARAVEL_PORT=80
|
||||
|
||||
@@ -6,19 +6,22 @@ set -e
|
||||
# init nvm
|
||||
\. $NVM_DIR/nvm.sh
|
||||
|
||||
|
||||
if [[ "$INSTALL_BEFORE_START" = true ]]; then
|
||||
echo "composer and npm install"
|
||||
composer install
|
||||
if [[ "$BOOT_NPM_INSTALL" = true ]]; then
|
||||
echo "npm install"
|
||||
npm install
|
||||
fi
|
||||
|
||||
if [[ "$BOOT_COMPOSER_INSTALL" = true ]]; then
|
||||
echo "composer install"
|
||||
composer install
|
||||
fi
|
||||
|
||||
if [ ! -f /var/www/html/artisan ]; then
|
||||
echo "No existing Laravel project found"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ "$AUTO_START_NPM_DEV" = true ]]; then
|
||||
if [[ "$BOOT_NPM_DEV" = true ]]; then
|
||||
echo "Staring npm dev"
|
||||
npm run dev --prefix /var/www/html &
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user