switch base container from ubuntu to php-alpine (#9)
Some checks failed
ci/woodpecker/manual/build_release/1 Pipeline failed
ci/woodpecker/manual/build_release/2 Pipeline failed
ci/woodpecker/manual/build_release/3 Pipeline failed
ci/woodpecker/manual/build_release/4 Pipeline failed

Co-authored-by: Ruben Momoa <ruben.lobbes@lobbes.nl>
Reviewed-on: #9
This commit was merged in pull request #9.
This commit is contained in:
2024-08-23 15:54:47 +02:00
parent 6f648c4ebd
commit cbd06482f4
7 changed files with 131 additions and 126 deletions

View File

@@ -1,15 +1,28 @@
#!/usr/bin/env bash
#!/usr/bin/env ash
# exit when any command fails
set -e
# init nvm
\. $NVM_DIR/nvm.sh
# install extra packages and extensions on first boot
if [[ ! -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 [[ "$INSTALL_BEFORE_START" = true ]]; then
echo "composer and npm install"
if [[ "$BOOT_COMPOSER_INSTALL" = true ]]; then
echo "composer install"
composer install
fi
if [[ "$BOOT_NPM_INSTALL" = true ]]; then
echo "npm install"
npm install
fi
@@ -18,10 +31,10 @@ if [ ! -f /var/www/html/artisan ]; then
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
echo "Staring Laravel"
php /var/www/html/artisan serve
php /var/www/html/artisan serve --host=0.0.0.0 --port="$WEBSERVER_PORT"