v0.66.1: inject USERDATA_PATH on first deploy too (shared withUserdataPath)

DeployStack's initial compose-up builds env from deploy values (not stackEnv), so
v0.66.0 missed USERDATA_PATH on first deploy → ${USERDATA_PATH} resolved to '' and
Docker bound a root-owned dir at the container root (found live: radarr /media/movies
was 0:0 755). Shared withUserdataPath injector now used by stackEnv AND
composeExecWithEnv. Regression test included.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-14 22:23:36 +02:00
parent c48f95fe06
commit 3b7d08979c
4 changed files with 51 additions and 4 deletions
+1 -3
View File
@@ -860,9 +860,7 @@ func (m *Manager) stackEnv(stackDir string) []string {
// Inject USERDATA_PATH = <namespace root>/userdata alongside HDD_PATH (v0.66.0). HDD_PATH IS
// the namespace root (the chosen StoragePath: a Model-A user drive's mount, or the SSD's
// felhom-data dir), so the catalog's ${USERDATA_PATH}/... mounts resolve under userdata/.
if hdd := appCfg.Env["HDD_PATH"]; hdd != "" {
env = append(env, fmt.Sprintf("USERDATA_PATH=%s", appbackup.UserdataDir(hdd)))
}
env = withUserdataPath(env, appCfg.Env["HDD_PATH"])
}
return env