From b8ab9264f4c0da19f40a41e7be7d5370f138de9e Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Sun, 22 Feb 2026 18:01:43 +0100 Subject: [PATCH] fix: SyncFileBrowserMounts reads domain from controller config instead of missing .env MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The filebrowser stack has no .env file — domain is baked into compose labels by docker-setup.sh. The sync always bailed with a WARN and storage paths were never applied to FileBrowser's config.yaml or docker-compose.yml. Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 5 +++++ controller/internal/web/handlers.go | 15 +++------------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1771e96..c003c8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## Changelog +### v0.27.1 — Fix FileBrowser Mount Sync (2026-02-22) + +#### Fixed +- **`internal/web/handlers.go`** — `SyncFileBrowserMounts()` was reading the domain from a `.env` file that doesn't exist in the filebrowser stack directory (domain is baked into the compose labels by `docker-setup.sh`). It always logged `[WARN] Cannot read DOMAIN from FileBrowser .env — skipping mount sync` and returned early, so storage paths were never synced to FileBrowser's config.yaml or docker-compose.yml. Fixed by using `s.cfg.Customer.Domain` directly from the controller config. + ### v0.27.0 — User-Configurable App Subdomains (2026-02-22) #### Added diff --git a/controller/internal/web/handlers.go b/controller/internal/web/handlers.go index a2c0d70..feeb407 100644 --- a/controller/internal/web/handlers.go +++ b/controller/internal/web/handlers.go @@ -1470,19 +1470,10 @@ func (s *Server) SyncFileBrowserMounts() { // Get all active storage paths paths := s.settings.GetStoragePaths() - // Read domain from .env - envPath := stackDir + "/.env" - domain := "" - if data, err := os.ReadFile(envPath); err == nil { - for _, line := range strings.Split(string(data), "\n") { - if strings.HasPrefix(line, "DOMAIN=") { - domain = strings.TrimPrefix(line, "DOMAIN=") - break - } - } - } + // Use domain from controller config + domain := s.cfg.Customer.Domain if domain == "" { - s.logger.Printf("[WARN] Cannot read DOMAIN from FileBrowser .env — skipping mount sync") + s.logger.Printf("[WARN] Cannot sync FileBrowser mounts — customer domain not configured") return }