From b72aeca55fa2f1b22d8a047c14fa3bb4db880fcd Mon Sep 17 00:00:00 2001 From: Chris Coutinho Date: Mon, 17 Nov 2025 22:14:01 +0100 Subject: [PATCH] test: Add custom notes app --- .../post-installation/10-install-notes-app.sh | 28 ++++++++++++++++++- docker-compose.yml | 2 +- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/app-hooks/post-installation/10-install-notes-app.sh b/app-hooks/post-installation/10-install-notes-app.sh index 8704e39..9057dd3 100755 --- a/app-hooks/post-installation/10-install-notes-app.sh +++ b/app-hooks/post-installation/10-install-notes-app.sh @@ -2,4 +2,30 @@ set -euox pipefail -php /var/www/html/occ app:enable notes +echo "Installing and configuring notes app for testing..." + +# Check if development notes app is mounted at /opt/apps/notes +if [ -d /opt/apps/notes ]; then + echo "Development notes app found at /opt/apps/notes" + + # Remove any existing notes app in apps (from app store or old symlink) + if [ -e /var/www/html/custom_apps/notes ]; then + echo "Removing existing notes in apps..." + rm -rf /var/www/html/custom_apps/notes + fi + + # Create symlink from apps to the mounted development version + # Per Nextcloud docs: apps outside server root need symlinks in server root + echo "Creating symlink: custom_apps/notes -> /opt/apps/notes" + ln -sf /opt/apps/notes /var/www/html/custom_apps/notes + + echo "Enabling notes app from /opt/apps (development mode via symlink)" + php /var/www/html/occ app:enable notes +elif [ -d /var/www/html/custom_apps/notes ]; then + echo "notes app directory found in apps (already installed)" + php /var/www/html/occ app:enable notes +else + echo "notes app not found, installing from app store..." + php /var/www/html/occ app:install notes + php /var/www/html/occ app:enable notes +fi diff --git a/docker-compose.yml b/docker-compose.yml index a6e2282..c8da873 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,7 +34,7 @@ services: - ./app-hooks:/docker-entrypoint-hooks.d:ro # Mount OIDC development directory outside /var/www/html to avoid rsync conflicts # The post-installation hook will register /opt/apps as an additional app directory - #- ./third_party:/opt/apps:ro + - ./third_party:/opt/apps:ro environment: - NEXTCLOUD_TRUSTED_DOMAINS=app - NEXTCLOUD_ADMIN_USER=admin