Automatically install apps specified via env variable. #29

Merged
decentral1se merged 3 commits from auto_app_install into main 2022-11-09 09:48:24 +00:00
3 changed files with 19 additions and 0 deletions

View File

@ -19,3 +19,5 @@ EXTRA_VOLUME=/dev/null:/tmp/.dummy
# X_FRAME_OPTIONS_ENABLED=1
# X_FRAME_OPTIONS_ALLOW_FROM=embedding-site.example.org
# APPS="calendar sociallogin onlyoffice"

16
abra.sh
View File

@ -13,6 +13,22 @@ sub_occ(){
sub_app_run php /var/www/html/occ "$@"
}
run_occ(){
su -p www-data -s /bin/sh -c "/var/www/html/occ $@"
}
install_apps(){
install_apps="$@"
if [ -z "$install_apps" ]
then
install_apps=$APPS
fi
for app in $install_apps
do
run_occ "app:install $app"
done
}
_backup_app() {
# Copied _abra_backup_dir to make UX better on restore and backup
{

View File

@ -49,6 +49,7 @@ services:
- db_password
- admin_password
environment:
- APPS
- X_FRAME_OPTIONS_ALLOW_FROM
- X_FRAME_OPTIONS_ENABLED
- DOMAIN