louislam / dockge

A fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager

Home Page:https://dockge.kuma.pet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error on multiple env files on docker compose

clabnet opened this issue Β· comments

⚠️ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

πŸ›‘οΈ Security Policy

Description

On compose file we use multiple .env files, one required, one optional.
Starting the container from docker desktop is ok, but starting from Dockge I have this error:

validating /opt/stacks/database/docker-compose.yml: services.mongodb.env_file.0 must be a string

I have tried to add " or ' into path env file name but it not work in any mode.

πŸ‘Ÿ Reproduction steps

version: "3.9"
services:
  mongodb:
    image: mongo
    container_name: mongodb
    restart: unless-stopped
    env_file:
      - path: ./.env.default
        required: true
      - path: ./.env.override
        required: false
    ports:
      - 27017:27017
    volumes:
      - mongoData:/data/db

πŸ‘€ Expected behavior

A normal start of the container

πŸ˜“ Actual Behavior

Error during start of container

Dockge Version

1.4.2

πŸ’» Operating System and Arch

Windows 11 x64

🌐 Browser

Versione 122.0.6261.129 (Build ufficiale) (a 64 bit)

πŸ‹ Docker Version

Docker desktop 4.28.0

🟩 NodeJS Version

20.11.0

πŸ“ Relevant log output

No response

This link can be useful : docker/compose#9181