Files
simple-laravel/build/start-container.sh
vista 9052ef6ccd
All checks were successful
ci/woodpecker/push/build-dev Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
Update build/start-container.sh
2023-08-24 22:50:52 +02:00

28 lines
483 B
Bash

#!/usr/bin/env bash
# exit when any command fails
set -e
# init nvm
\. $NVM_DIR/nvm.sh
if [[ "$INSTALL_BEFORE_START" = true ]]; then
echo "composer and npm install"
composer install
npm install
fi
if [ ! -f /var/www/html/artisan ]; then
echo "No existing Laravel project found"
exit
fi
if [[ "$AUTO_START_NPM_DEV" = true ]]; then
echo "Staring npm dev"
npm run dev --prefix /var/www/html &
fi
echo "Staring Laravel"
php /var/www/html/artisan serve