mirror of
https://github.com/moghtech/komodo.git
synced 2026-07-16 12:42:11 -05:00
[GH-ISSUE #696] --env-file order different when using pull and deploy #3519
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 @nicolas-r on GitHub (Jul 31, 2025).
Original GitHub issue: https://github.com/moghtech/komodo/issues/696
I'm using Komodo to deploy stack present in my forgejo instance.
I'm using environment variables set in the webui and env file present in the git repo.
I have discovered that when using "Pull image", Komodo uses this line
cd /mnt/.ix-apps/app_mounts/komodo/periphery_root/stacks/jellyfin && docker compose -p jellyfin -f compose.yaml --env-file container.env --env-file .env-komodo pullAnd I get that in the logs
time="2025-07-31T10:49:15+02:00" level=warning msg="The \"DOCKER_VOLUMES_ROOT_DIR\" variable is not set. Defaulting to a blank string." time="2025-07-31T10:49:15+02:00" level=warning msg="The \"DOCKER_VOLUMES_ROOT_DIR\" variable is not set. Defaulting to a blank string."When I use "Deploy Stack", Komodo uses this line
cd /mnt/.ix-apps/app_mounts/komodo/periphery_root/stacks/jellyfin && docker compose -p jellyfin -f compose.yaml --env-file .env-komodo --env-file container.env pullAnd I don't get the warnings about variables not set.
In container.env, I'm using a variable defined in .env-komodo, and in the first case, the .env-komodo is placed after container.env in the docker compose command line, so maybe the order matters ?
@mbecker20 commented on GitHub (Jul 31, 2025):
Thanks for pointing this out, pull needs to become the same as deploy.
@nicolas-r commented on GitHub (Aug 19, 2025):
Hi
I have tested the new version 1.19 with your fix and I can't deploy my stack anymore.
Now, the deploy call is the same as the previous pull, so I get a blank variable.
My container.env depends on a variable that is set in the .env-komodo defined from the gui like this
DOCKER_VOLUMES_ROOT_DIR=DOCKER_VOLUMES_ROOT_DIR
I'm currently a workaround that consists in adding .env-komodo as an Additional Env Files before container.env
Is there a better approach or solution ?
Thanks
@mbecker20 commented on GitHub (Aug 30, 2025):
Yes understood, apologies the fix to align the two made your case broken in both cases. The reason is that now Komodo env is the last to be applied in order for it to be the override env, which was the intention for pull too but wasn't applied there.
If you have a variable in container.env relying on Komodo variable, consider simply moving it into the Komodo environment.
Anyways, the pull ordering is now the same, and I will close this issue.