Files
simple-laravel/build/start-container.sh
Ruben Momoa b4c00d4459
All checks were successful
ci/woodpecker/push/build Pipeline was successful
option to change the port of the webserver
2024-08-20 17:04:17 +02:00

31 lines
580 B
Bash

#!/usr/bin/env bash
# exit when any command fails
set -e
# init nvm
\. "$NVM_DIR"/nvm.sh
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 [[ "$BOOT_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 --host=0.0.0.0 --port="$WEBSERVER_PORT"