install extra packages and extensions on first boot
All checks were successful
ci/woodpecker/push/build_dev Pipeline was successful
All checks were successful
ci/woodpecker/push/build_dev Pipeline was successful
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user