install extra packages and extensions on first boot
All checks were successful
ci/woodpecker/push/build_dev Pipeline was successful

This commit is contained in:
Ruben Momoa
2024-08-22 16:41:22 +02:00
parent 5b726223ed
commit 1681e3d926
2 changed files with 13 additions and 0 deletions

View File

@@ -3,6 +3,17 @@
# exit when any command fails
set -e
# install extra packages and extensions on first boot
if [[ ! -f /etc/first_boot ]]; then
if [[ -n "${EXTRA_APK_PACKAGES// /}" ]]; then
apk add --no-cache "$EXTRA_APK_PACKAGES"
fi
if [[ -n "${EXTRA_PHP_EXTENSIONS// /}" ]]; then
docker-php-ext-install "$EXTRA_PHP_EXTENSIONS"
fi
touch /etc/first_boot
fi
if [[ "$BOOT_NPM_INSTALL" = true ]]; then
echo "npm install"
npm install

View File

@@ -16,6 +16,8 @@ services:
BOOT_NPM_DEV: true # also starts `npm dev`
BOOT_NPM_INSTALL: true # runs `npm install` on boot
BOOT_COMPOSER_INSTALL: true # runs `composer install` on boot
#EXTRA_APK_PACKAGES: # string with extra packages to install on first boot example: "git python"
#EXTRA_PHP_EXTENSIONS: # string with extra php extensions to install on first boot
depends_on:
- mysql
- redis