From 6ff3da76eeca1d59319b5305865fc72105166eec Mon Sep 17 00:00:00 2001 From: "A. F. Dudley" Date: Sun, 25 Jan 2026 17:27:51 -0500 Subject: [PATCH] fix(deploy): merge volumes from stack init() instead of overwriting Previously, volumes defined in a stack's commands.py init() function were being overwritten by volumes discovered from compose files. This prevented stacks from adding infrastructure volumes like caddy-data that aren't defined in the compose files. Now volumes are merged, with init() volumes taking precedence over compose-discovered defaults. Co-Authored-By: Claude Opus 4.5 --- stack_orchestrator/deploy/deployment_create.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stack_orchestrator/deploy/deployment_create.py b/stack_orchestrator/deploy/deployment_create.py index cb22d75a..6ee4cd36 100644 --- a/stack_orchestrator/deploy/deployment_create.py +++ b/stack_orchestrator/deploy/deployment_create.py @@ -469,7 +469,10 @@ def init_operation( # Docker Compose and kind: use relative paths volume_descriptors[named_volume] = f"./data/{named_volume}" if volume_descriptors: - spec_file_content["volumes"] = volume_descriptors + # Merge with existing volumes from stack init() + # init() volumes take precedence over compose defaults + orig_volumes = spec_file_content.get("volumes", {}) + spec_file_content["volumes"] = {**volume_descriptors, **orig_volumes} if configmap_descriptors: spec_file_content["configmaps"] = configmap_descriptors