mirror of
https://github.com/moghtech/komodo.git
synced 2026-05-06 08:40:30 -05:00
[GH-ISSUE #773] [QUESTION] One commit deploys all stacks #6305
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @shadybraden on GitHub (Aug 27, 2025).
Original GitHub issue: https://github.com/moghtech/komodo/issues/773
I believe this is user error, not a bug, but let me explain.
When I make a commit to my git repo (e.g. update a version tag on a compose.yaml) Komodo runs a Deploy on all stacks. Now most are already running, but anything that was either stopped or destroyed gets started up.
I don't believe this is the intended behavior, but suspect I mis-configured something.
My repo (which is a mirror of a local Forgejo instance)
Komodo has the webhooks:
https://komodo.holmlab.org/listener/github/stack/factorio-holmie/deployEtc, for each stack (see my stacks hereSo when I edit the compose.yaml for Factorio, it updates every other stack on that server.
This is visually seen in a spamming of toast notification on the bottom right of Komodo.
I can submit screenshots/video of this if you'd like.
@mbecker20 commented on GitHub (Aug 27, 2025):
After adding config file tracking for first time, on first deploy after configuring files all stack see this diff and will deploy. Subsequent deploys compare states with this first one to actually smart decide. Any chance you did not allow the Stacks one deploy cycle to get started tracking files for deploy?
Also, don't trigger mono repo stacks directly. Trigger an action or procedure using single webhook and further automation in there.
@shadybraden commented on GitHub (Aug 27, 2025):
Hmmm I don't seem to understand the intended usage of webhooks. Looking at https://komo.do/docs/resources/webhooks#when-does-it-trigger ...
So if I have a mono repo, with 2x folders, each with a compose.yaml in it.
If I want only folder1's compose to redeploy on a
git pushwith edits tofolder1/compose.yamlhow would I do that? Do I need only 1 webhook? Are there examples of procedures that, on any webhook, will look at what changed and redeploy only that?Thanks!!
@shadybraden commented on GitHub (Aug 28, 2025):
I've been using Stacks to deploy a compose.yaml file.
Should I be using Deployments?
example stack:
stack
name = "forgejo"
[stack.config]
server = "server1"
project_name = "forgejo"
git_provider = "git.holmlab.org"
git_account = "komodo"
repo = "shady/compose"
branch = "main"
run_directory = "forgejo"
additional_env_files = ["/etc/komodo/domain.env"]
@shadybraden commented on GitHub (Aug 28, 2025):
I am now using a procedure like:
https://github.com/moghtech/komodo/issues/769
So one procedure, saying to BatchDeployStackIfChanged. Now the issue is that everytime that webhook is heard all containers get deployed always. Even just on a testing of the webhook.
I believe this can be fixed by using the linked_repo rather than a full repo clone per stack....This will take some time to transfer over.
@mbecker20 commented on GitHub (Aug 28, 2025):
It works the same using linked repo or otherwise. There's not really enough information for me to guess why it's behaving as you say, which is not expected.
@shadybraden commented on GitHub (Aug 28, 2025):
Thank you for the help. You did point me in the right direction. I believe I figured it out - definitely user error.
For anyone in the future, look at my compose repo for my working setup.