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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user