Skip to content

stack.env does not work when deploying via repository #12376

@marioja

Description

@marioja

Before you start please confirm the following.

Problem Description

When deploying via repository and using a relative local filesystem path, the stack.env file in the repository is not used. You can see this demonstrated using the simple test repository at:
Test stack.env repo

Expected Behavior

When running creating the stack from the sample repo, I expect the value of the env1 to display

Actual Behavior

The value is blank

Steps to Reproduce

  1. Create the stack from https://github.com/marioja/test-stack-env.git.
  2. enable relative path volumes
  3. specify a valid/existing local filesystem path on your docker host
  4. click deploy
  5. Look at the logs from the only container created

Portainer logs or screenshots

env1=

Portainer version

2.21.3

Portainer Edition

Business Edition (BE/EE) with 5NF / 3NF license

Platform and Version

Docker 27.1.1 (API: 1.46)

OS and Architecture

TrueNAS Scale 24.10

Browser

Chrome Version 130.0.6723.117

What command did you use to deploy Portainer?

No response

Additional Information

There is a related issue #6701 but this issue is a specific case. One other point is the sample repo I provided has the docker-compose.yml and stack.env file at the root of the repository. In my real use-case both are in some folders in the git repo. I get the same error but this is a test case that should be also verified when you do a fix.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions