[GH-ISSUE #696] --env-file order different when using pull and deploy #5093

Closed
opened 2026-04-22 00:21:32 -05:00 by GiteaMirror · 3 comments
Owner

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 pull

And 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 pull

And 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 ?

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 pull` And 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 pull` And 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 ?
GiteaMirror added the bug label 2026-04-22 00:21:32 -05:00
Author
Owner

@mbecker20 commented on GitHub (Jul 31, 2025):

Thanks for pointing this out, pull needs to become the same as deploy.

<!-- gh-comment-id:3140704826 --> @mbecker20 commented on GitHub (Jul 31, 2025): Thanks for pointing this out, pull needs to become the same as deploy.
Author
Owner

@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

<!-- gh-comment-id:3199751567 --> @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
Author
Owner

@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.

<!-- gh-comment-id:3238976415 --> @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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#5093