Skip to content

DeployStack doesn't recreate containers when environment config changes #1205

@boroughnexus-cto

Description

@boroughnexus-cto

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:
{"type":"UpdateStack","params":{"id":"<stack_id>","config":{"environment":"NEW_VAR=true"}}}
  1. Deploy the stack:
{"type":"DeployStack","params":{"stack":"<stack_id>"}}
  1. Check running container:
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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions