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)
|
# 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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user