0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-06-16 16:14:47 +02:00

Install apps via env var for initial setup

This commit is contained in:
Martin Gerhardy 2020-10-05 17:51:08 +02:00
parent 5e0d2b2b79
commit 0b6fbb6a52
4 changed files with 22 additions and 0 deletions

View file

@ -168,6 +168,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done done
fi fi
if [ -n "${NEXTCLOUD_INSTALL_APPS+x}" ]; then
echo "Install apps…"
echo "$NEXTCLOUD_INSTALL_APPS" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | tr " " \\n | while read APP; do
run_as "php /var/www/html/occ app:install -n $APP"
done
fi
else else
echo "running web-based installer on first connect!" echo "running web-based installer on first connect!"
fi fi

View file

@ -168,6 +168,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done done
fi fi
if [ -n "${NEXTCLOUD_INSTALL_APPS+x}" ]; then
echo "Install apps…"
echo "$NEXTCLOUD_INSTALL_APPS" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | tr " " \\n | while read APP; do
run_as "php /var/www/html/occ app:install -n $APP"
done
fi
else else
echo "running web-based installer on first connect!" echo "running web-based installer on first connect!"
fi fi

View file

@ -168,6 +168,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done done
fi fi
if [ -n "${NEXTCLOUD_INSTALL_APPS+x}" ]; then
echo "Install apps…"
echo "$NEXTCLOUD_INSTALL_APPS" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | tr " " \\n | while read APP; do
run_as "php /var/www/html/occ app:install -n $APP"
done
fi
else else
echo "running web-based installer on first connect!" echo "running web-based installer on first connect!"
fi fi

View file

@ -133,6 +133,10 @@ One or more trusted domains can be set through environment variable, too. They w
- `NEXTCLOUD_TRUSTED_DOMAINS` (not set by default) Optional space-separated list of domains - `NEXTCLOUD_TRUSTED_DOMAINS` (not set by default) Optional space-separated list of domains
To install apps with the initial nextcloud installation, you can set a space separated list of apps.
- `NEXTCLOUD_INSTALL_APPS` (not set by default) Optional space-separated list of apps
The install and update script is only triggered when a default command is used (`apache-foreground` or `php-fpm`). If you use a custom command you have to enable the install / update with The install and update script is only triggered when a default command is used (`apache-foreground` or `php-fpm`). If you use a custom command you have to enable the install / update with
- `NEXTCLOUD_UPDATE` (default: _0_) - `NEXTCLOUD_UPDATE` (default: _0_)