Skip to content
Discussion options

You must be logged in to vote

Hi @maomao-paradox here is a full breakdown on why this is happening.

Why Directly Editing stack.env Has No Effect in the Portainer UI

Two Sources of Truth

Portainer maintains two separate stores for stack environment variables, and they do not automatically sync with each other:

Store Location What it controls
Portainer Database (portainer.db) /var/lib/docker/volumes/portainer_data/_data/portainer.db What the Portainer UI displays and what is used on the next deploy
stack.env file on disk /var/lib/docker/volumes/portainer_data/_data/compose/<id>/stack.env Used by docker compose at runtime

How stack.env Is Actually Generated

The stack.env file is not the source of truth. It is…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by maomao-paradox
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants