Skip to content

Portainer 2.24.0 Stacks: service.env file dosen't work when stacks are in subdirs of a repo #12398

Closed
@MarcelloPercoco

Description

@MarcelloPercoco

Before you start please confirm the following.

Problem Description

Previously as i was deployng a stack from a git repository i was able to reference an environment file with "env_file: service.env"in the service, and the corresponding service.env file in the repository

This doesn't work in 2.24.0, and receive a file not found error.

Expected Behavior

As in 2.23.0 the stack should be deployed and env file should be read

Actual Behavior

Stack is not deployed with message "service.env file not found"

Steps to Reproduce

Have a stack from git with service.env files, referenced via "env_file: service.env" in compose definition
deploy with protainer 2.23.0 and it works
upgrade to portainer 2.24.0
try to deploy tha stack, it will not work

Portainer logs or screenshots

No response

Portainer version

2.24.0

Portainer Edition

Community Edition (CE)

Platform and Version

Docker 27.3.1 standalone

OS and Architecture

Archlinux x86_64

Browser

Chorme

What command did you use to deploy Portainer?

Deployed via a compose file and a script thath fille the version variable

services:
  server:
    image: portainer/portainer-ce:${PORTAINER_VERSION}
    labels:
      - wud.watch=true
      - wud.tag.include=^\d+\.\d+\.\d+$
    environment:
      - AGENT_SECRET=Forever_4l0n3
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /etc/portainer:/data
    restart: always
    network_mode: "host"

Additional Information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions