stack-orchestrator/stack_orchestrator/deploy/compose
Prathamesh Musale 569215f6f7 deploy: restart now force-recreates compose containers
Operator-reported: editing source files mounted into a service via
bind volumes (alert rules, dashboards, scripts, templates, telegraf
config) and running 'laconic-so deployment ... restart' did not
take effect. Operator had to fall back to 'stop && start' to pick
up changes.

Root cause: 'restart' calls up_operation, which translates to
'docker compose up -d'. Compose's up only recreates a container
when the *service definition* itself (image, env, ports, volume
declarations) changes. Bind-mount target file content is not part
of that hash, so the running container kept its old in-memory
state (e.g. Grafana's pre-edit provisioning).

Add force_recreate kwarg through the deployer interface and have
restart pass force_recreate=True. compose path threads through to
python_on_whales' compose.up(force_recreate=...). k8s path accepts
the kwarg but is a no-op for now (rolling update on
unchanged-spec needs a separate fix that stamps the
kubectl.kubernetes.io/restartedAt annotation on managed
Deployments; tracked in a follow-up).
2026-05-06 09:09:52 +00:00
..
__init__.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
deploy_docker.py deploy: restart now force-recreates compose containers 2026-05-06 09:09:52 +00:00