Some checks failed
ci/woodpecker/release/build_release/1 Pipeline was successful
ci/woodpecker/release/build_release/2 Pipeline was successful
ci/woodpecker/release/build_release/3 Pipeline was successful
ci/woodpecker/release/build_release/4 Pipeline was successful
ci/woodpecker/cron/build_release/1 Pipeline failed
ci/woodpecker/cron/build_release/2 Pipeline failed
ci/woodpecker/cron/build_release/3 Pipeline failed
ci/woodpecker/cron/build_release/4 Pipeline failed
install simplexml and xmlreader and fix issue with running as none root user and remove debug pipeline step Co-authored-by: Ruben Momoa <ruben.lobbes@lobbes.nl> Reviewed-on: #24
41 lines
989 B
Bash
41 lines
989 B
Bash
#!/usr/bin/env ash
|
|
|
|
# exit when any command fails
|
|
set -e
|
|
|
|
# install extra packages and extensions on first boot
|
|
if [[ $(id -u) -eq 0 && ! -f /etc/first_boot ]]; then
|
|
if [[ -n "${EXTRA_APK_PACKAGES// /}" ]]; then
|
|
# shellcheck disable=SC2086
|
|
apk add --no-cache $EXTRA_APK_PACKAGES
|
|
fi
|
|
if [[ -n "${EXTRA_PHP_EXTENSIONS// /}" ]]; then
|
|
# shellcheck disable=SC2086
|
|
docker-php-ext-install $EXTRA_PHP_EXTENSIONS
|
|
fi
|
|
touch /etc/first_boot
|
|
fi
|
|
|
|
if [[ "$BOOT_COMPOSER_INSTALL" = true ]]; then
|
|
echo "composer install"
|
|
composer install
|
|
fi
|
|
|
|
if [[ "$BOOT_NPM_INSTALL" = true ]]; then
|
|
echo "npm install"
|
|
npm install --cache /tmp/npm
|
|
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"
|