fix: SyncFileBrowserMounts reads domain from controller config instead of missing .env
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 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
## Changelog
|
## 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)
|
### v0.27.0 — User-Configurable App Subdomains (2026-02-22)
|
||||||
|
|
||||||
#### Added
|
#### Added
|
||||||
|
|||||||
@@ -1470,19 +1470,10 @@ func (s *Server) SyncFileBrowserMounts() {
|
|||||||
// Get all active storage paths
|
// Get all active storage paths
|
||||||
paths := s.settings.GetStoragePaths()
|
paths := s.settings.GetStoragePaths()
|
||||||
|
|
||||||
// Read domain from .env
|
// Use domain from controller config
|
||||||
envPath := stackDir + "/.env"
|
domain := s.cfg.Customer.Domain
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if 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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user