#1205·komodo

DeployStack doesn't recreate containers when environment config changes

Author: boroughnexus-ctoCreated Feb 16, 2026Updated Sep 17, 2026

Issue

When updating a Stack's config.environment via UpdateStack API call, followed by DeployStack, the container is not recreated with the new environment variables.

Steps to Reproduce

  1. Update stack config with new environment variable:
json
{"type":"UpdateStack","params":{"id":"<stack_id>","config":{"environment":"NEW_VAR=true"}}}
  1. Deploy the stack:
json
{"type":"DeployStack","params":{"stack":"<stack_id>"}}
  1. Check running container:
bash
docker exec <container> env | grep NEW_VAR
# Returns nothing - variable not present

Expected Behavior

DeployStack should detect that environment variables have changed and recreate the container (docker-compose up -d --force-recreate or equivalent).

Actual Behavior

Container continues running with old environment. The only way to apply the change is to manually restart/recreate the container.

Workaround

Manually recreate container:

bash
docker-compose down && docker-compose up -d

Environment

  • Komodo Core: ghcr.io/moghtech/komodo-core:latest
  • Stack type: Git-synced (TKNet-Docker-Stacks repo)
  • API endpoint: /execute with DeployStack operation

Impact

Medium - Environment config changes require manual intervention instead of being applied automatically through the API/UI.

Related

This may be related to how Komodo detects whether a stack needs redeployment. It might only check git hash changes, not config changes.