feat: app-to-app integration framework + OnlyOffice handlers

Generic integration system for connecting deployed apps via toggle UI.
First handlers: OnlyOffice→FileBrowser (config.yaml patch) and
OnlyOffice→Nextcloud (occ CLI). Lifecycle hooks auto-suspend on
stop and re-apply on start.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 20:06:20 +01:00
parent d3b53d9877
commit 0a5840a255
15 changed files with 992 additions and 1 deletions
+10
View File
@@ -478,6 +478,12 @@ func (s *Server) appDetailHandler(w http.ResponseWriter, r *http.Request, slug s
data["HasOptionalConfig"] = found.Meta.HasOptionalConfig()
data["EffectiveSubdomain"] = effectiveSubdomain
// App-to-app integrations
if found.Meta.HasIntegrations() && s.integrationMgr != nil {
data["HasIntegrations"] = true
data["Integrations"] = s.integrationMgr.ListForProvider(found.Meta.Slug)
}
// Geo-restriction per-app data
geo := s.settings.GetGeoRestriction()
if geo != nil && geo.Enabled && s.cfg.Infrastructure.CFAPIToken != "" {
@@ -1615,6 +1621,10 @@ func (s *Server) SyncFileBrowserMounts() {
s.logger.Printf("[ERROR] Failed to recreate FileBrowser: %s — %v", string(out), err)
} else {
s.logger.Printf("[INFO] FileBrowser mounts synced — %d storage path(s), config updated", len(paths))
// Re-apply active integrations (config regeneration overwrites config.yaml)
if s.integrationMgr != nil {
go s.integrationMgr.OnStackStart(context.Background(), "filebrowser")
}
}
}