v0.331.0: OnlyOffice opens and saves from FileBrowser and Nextcloud; FileBrowser back at once after a restart (R-1018)
gates / gates (push) Successful in 48s

FileBrowser config carries server.internalUrl http://filebrowser:80 (OnlyOffice fetched the public files address and got 403);
Nextcloud's DocumentServerInternalUrl gets its trailing slash (every save was lost: http://onlyoffice:80cache/...);
RestartStack("filebrowser") runs the R-1126 gate at once (files.<domain> was 502 for up to 5 min after the link switched).
Each red-proofed. MinAgent 0.158.1.
This commit is contained in:
2026-10-18 21:05:04 +02:00
parent 615940de35
commit 772ef36f5f
10 changed files with 317 additions and 44 deletions
+29
View File
@@ -1,6 +1,8 @@
package infra
import (
"net/url"
"strconv"
"strings"
"testing"
@@ -248,6 +250,33 @@ func TestFileBrowserRender(t *testing.T) {
}
}
// R-1018: OnlyOffice's server fetches and saves a FileBrowser document at server.internalUrl. The consequence pinned:
// that URL names the FileBrowser container on port 80 — the name OnlyOffice resolves on traefik-public — and the
// container really is called that in the compose. RED-PROOF: drop the config line (FileBrowser then hands OnlyOffice
// the public https://files.<domain>, 403 on demo-hp 2026-10-18) or rename the container → this fails.
func TestFileBrowserConfig_R1018_InternalURLIsTheContainer(t *testing.T) {
var cfg struct {
Server struct {
InternalURL string `yaml:"internalUrl"`
Port int `yaml:"port"`
} `yaml:"server"`
}
if err := yaml.Unmarshal([]byte(RenderFileBrowserConfig([]settings.StoragePath{{Path: "/mnt/hdd_1"}}, true)), &cfg); err != nil {
t.Fatalf("config does not parse: %v", err)
}
u, err := url.Parse(cfg.Server.InternalURL)
if err != nil || u.Scheme != "http" || u.Hostname() == "" {
t.Fatalf("server.internalUrl = %q — OnlyOffice would be handed the public files address", cfg.Server.InternalURL)
}
if u.Port() != strconv.Itoa(cfg.Server.Port) {
t.Errorf("server.internalUrl port %q, FileBrowser listens on %d", u.Port(), cfg.Server.Port)
}
compose := RenderFileBrowserCompose("demo-felhom.eu", nil)
if !strings.Contains(compose, "container_name: "+u.Hostname()+"\n") {
t.Errorf("server.internalUrl names %q, which is not the FileBrowser container:\n%s", u.Hostname(), compose)
}
}
// R-1126 (D11 = A): FileBrowser starts OFF traefik-public — the box joins it there only after this run's default login
// is checked — and on its own network, which the controller joins for that check. v0.327.1: NO Traefik labels — the
// route is the file-provider route by NAME (a label route kept the address Traefik chose at container start, on the