[dd-ctl] Move NC forms towards the end
This may be causing issues when the plugin requires occ upgrade Alternatively, installing plugins may require it. While there, also remove one of the nextcloud_scan calls and delay it along with logo customisation until after a potential ./occ upgrade has taken place.merge-requests/62/head
parent
0994ea6bed
commit
ac789f8d6c
32
dd-ctl
32
dd-ctl
|
@ -356,20 +356,18 @@ setup_nextcloud(){
|
|||
EOF
|
||||
fi
|
||||
|
||||
#docker exec -u www-data dd-apps-nextcloud-app php occ app:install user_saml
|
||||
docker exec -u www-data dd-apps-nextcloud-app php occ app:enable user_saml
|
||||
|
||||
# Installing apps may require an occ upgrade
|
||||
nextcloud_upgrade
|
||||
|
||||
# Temporary patch while upstream lands our changes
|
||||
# See: https://github.com/nextcloud/mail/pull/6908
|
||||
for f in appinfo/info.xml lib/Command/UpdateAccount.php lib/Db/MailAccountMapper.php; do
|
||||
install -m 0644 -o 82 -g 82 "dd-apps/docker/nextcloud/nc_mail/$f" "${SRC_FOLDER}/nextcloud/custom_apps/mail/$f"
|
||||
done
|
||||
|
||||
# Custom forms
|
||||
docker exec dd-apps-nextcloud-app apk add git npm composer
|
||||
docker exec -u www-data dd-apps-nextcloud-app rm -rf /var/www/html/custom_apps/forms
|
||||
docker exec -u www-data dd-apps-nextcloud-app git clone https://github.com/juanan3ip/form -b dev /var/www/html/custom_apps/forms
|
||||
docker exec -u www-data dd-apps-nextcloud-app npm --prefix /var/www/html/custom_apps/forms install
|
||||
docker exec -u www-data dd-apps-nextcloud-app composer -d/var/www/html/custom_apps/forms install --no-dev -o
|
||||
docker exec -u www-data dd-apps-nextcloud-app php occ app:enable forms
|
||||
|
||||
# Disable Big Blue Button media check by default
|
||||
docker exec -u www-data dd-apps-nextcloud-app php occ config:app:set bbb join.mediaCheck --value="false"
|
||||
# Disable Big Blue Button listen only mode by default
|
||||
|
@ -384,11 +382,8 @@ setup_nextcloud(){
|
|||
docker exec -u www-data dd-apps-nextcloud-app php occ --no-warnings config:system:set allow_local_remote_servers --value=true
|
||||
docker exec -u www-data dd-apps-nextcloud-app php occ --no-warnings maintenance:theme:update
|
||||
|
||||
#docker exec -u www-data dd-apps-nextcloud-app php occ app:install user_saml
|
||||
docker exec -u www-data dd-apps-nextcloud-app php occ app:enable user_saml
|
||||
docker exec dd-apps-nextcloud-app apk add jq
|
||||
docker exec dd-apps-nextcloud-app sh -c 'jq ". + {\"pad\": [\"application/x-ownpad\"], \"calc\": [\"application/x-ownpad\"]}" /var/www/html/resources/config/mimetypemapping.dist.json > /var/www/html/config/mimetypemapping.json'
|
||||
nextcloud_scan
|
||||
# Open pads in a new tab/window
|
||||
docker exec dd-apps-nextcloud-app sed -i.orig 's/^\(\s*\)\(var viewer = OC.generateUrl.*\)/\1\2\n\1window.open(viewer);\n\1return;/' /var/www/html/custom_apps/ownpad/js/ownpad.js
|
||||
|
||||
|
@ -472,16 +467,25 @@ setup_nextcloud(){
|
|||
# Add default file for moodle activities
|
||||
if [ ! -f "$DATA_FOLDER/nextcloud/admin/files/template.docx" ]; then
|
||||
cp dd-apps/docker/nextcloud/template.docx "$DATA_FOLDER/nextcloud/admin/files/"
|
||||
nextcloud_scan
|
||||
fi
|
||||
|
||||
configure_nextcloud_logo
|
||||
# Custom forms
|
||||
## This may be forcing the need for occ upgrade in the past
|
||||
## Keep it towards the end
|
||||
docker exec dd-apps-nextcloud-app apk add git npm composer
|
||||
docker exec -u www-data dd-apps-nextcloud-app rm -rf /var/www/html/custom_apps/forms
|
||||
docker exec -u www-data dd-apps-nextcloud-app git clone https://github.com/juanan3ip/form -b dev /var/www/html/custom_apps/forms
|
||||
docker exec -u www-data dd-apps-nextcloud-app npm --prefix /var/www/html/custom_apps/forms install
|
||||
docker exec -u www-data dd-apps-nextcloud-app composer -d/var/www/html/custom_apps/forms install --no-dev -o
|
||||
docker exec -u www-data dd-apps-nextcloud-app php occ app:enable forms
|
||||
|
||||
nextcloud_upgrade
|
||||
configure_nextcloud_logo
|
||||
nextcloud_scan
|
||||
}
|
||||
|
||||
nextcloud_upgrade(){
|
||||
docker-compose exec -u www-data dd-apps-nextcloud-app ./occ upgrade
|
||||
docker exec -i -u www-data dd-apps-nextcloud-app ./occ upgrade
|
||||
}
|
||||
|
||||
nextcloud_scan(){
|
||||
|
|
Loading…
Reference in New Issue