Skip to content

Modern Docker Management, Designed for Everyone

fix: discard env_file when loading projects to match compose CLI config-hash (#3100)

Panos Koutsovasilis7bc4af0fc614
diff --git a/backend/pkg/projects/load.go b/backend/pkg/projects/load.go
index 5f34eed4d..ff9005910 100644
--- a/backend/pkg/projects/load.go
+++ b/backend/pkg/projects/load.go
@@ -270,6 +270,9 @@ func loadComposeProjectInternal(
if projectName != "" {
opts.SetProjectName(projectName, true)
}
+ // Discard env_file after folding into environment, as the compose CLI
+ // does, so config-hashes match and both tools stop recreating services.
+ loader.WithDiscardEnvFiles(opts)
if lenient {
opts.SkipValidation = true
opts.SkipConsistencyCheck = true