diff --git a/.gitmodules b/.gitmodules index e70e53a..0bbfcae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "third_party/oidc"] path = third_party/oidc url = https://github.com/cbcoutinho/oidc +[submodule "third_party/notes"] + path = third_party/notes + url = https://github.com/cbcoutinho/notes diff --git a/app-hooks/post-installation/10-install-notes-app.sh b/app-hooks/post-installation/10-install-notes-app.sh index 8704e39..09d99c9 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/apps/notes ]; then + echo "Removing existing notes in apps..." + rm -rf /var/www/html/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: apps/notes -> /opt/apps/notes" + ln -sf /opt/apps/notes /var/www/html/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/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/third_party/notes b/third_party/notes new file mode 160000 index 0000000..2d2575a --- /dev/null +++ b/third_party/notes @@ -0,0 +1 @@ +Subproject commit 2d2575afeae81ded863230e1edae57e6dca4a2f8 diff --git a/third_party/oidc b/third_party/oidc index 9616294..e83dabb 160000 --- a/third_party/oidc +++ b/third_party/oidc @@ -1 +1 @@ -Subproject commit 96162949117d9325e45e06acd3bbdd0fdb20450c +Subproject commit e83dabbac17142f7ece6219e5b33ca145fc99ae6