From 2d6883eb671b83e7fdcb6279af28f3e713340b09 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Tue, 6 Jan 2026 22:16:51 -0300 Subject: [PATCH] nextcloud: restore mimetype defaults for external app --- services/nextcloud/deployment.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/nextcloud/deployment.yaml b/services/nextcloud/deployment.yaml index 1f6f89f..8cad32f 100644 --- a/services/nextcloud/deployment.yaml +++ b/services/nextcloud/deployment.yaml @@ -65,6 +65,17 @@ spec: fi installed="$(su -s /bin/sh www-data -c "php /var/www/html/occ status" 2>/dev/null | awk '/installed:/{print $3}' || true)" if [ "${installed}" = "true" ]; then + ensure_mime_defaults() { + cfg_dir="/var/www/html/resources/config" + mkdir -p "${cfg_dir}" + if [ ! -s "${cfg_dir}/mimetypemapping.dist.json" ]; then + curl -fsSL https://raw.githubusercontent.com/nextcloud/server/v29.0.16/resources/config/mimetypemapping.dist.json -o "${cfg_dir}/mimetypemapping.dist.json" || true + fi + if [ ! -s "${cfg_dir}/mimetypealiases.dist.json" ]; then + curl -fsSL https://raw.githubusercontent.com/nextcloud/server/v29.0.16/resources/config/mimetypealiases.dist.json -o "${cfg_dir}/mimetypealiases.dist.json" || true + fi + chown -R 33:33 "${cfg_dir}" || true + } install_app() { app="$1" url="$2" @@ -77,6 +88,7 @@ spec: chown -R 33:33 "${target}" su -s /bin/sh www-data -c "php /var/www/html/occ app:enable --force ${app}" || true } + ensure_mime_defaults install_app oidc_login https://github.com/pulsejet/nextcloud-oidc-login/releases/download/v3.2.2/oidc_login.tar.gz install_app external https://github.com/nextcloud-releases/external/releases/download/v5.4.1/external-v5.4.1.tar.gz install_app mail https://github.com/nextcloud-releases/mail/releases/download/v3.7.24/mail-stable3.7.tar.gz