louislam / dockge

A fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager
https://dockge.kuma.pet
MIT License
12.95k stars 367 forks source link

Error on multiple env files on docker compose #454

Open clabnet opened 8 months ago

clabnet commented 8 months ago

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

🛡️ 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

clabnet commented 8 months ago

image

clabnet commented 8 months ago

image

clabnet commented 8 months ago

This link can be useful : https://github.com/docker/compose/issues/9181