Dokploy / Dokploy/dokploy

Multiple env files for compose

Open
#2,122 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

What problem will this feature address?

When deploying docker-compose.yml with a lot of interconnected services with hundreds of environment variables expected to be split in multiple files (for example for name collision, where two different services use the same APP_KEY variable but with different meanings), the fact that we have just a single .env file is very limiting.

Describe the solution you'd like

The best solution is to allow for Compose configuration to add multiple .env files with custom names.

Describe alternatives you've considered

Right now I have no alternatives because the service I'm deploying is not mine to modify and I prefer to not mix the env variables of the two applications and move the conflicting ones outside of the env into the compose file itself.
At the end I have reconstructed the original compose as single applications, it's working but they are not isolated.

Additional context

No response

Will you send a PR to implement it?

Maybe, need help

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Compose deployment/configuration path and its current handling of docker-compose.yml and the single .env file. Trace how environment variables reach each service, then review existing tests or validation around Compose configuration. Done means custom-named multiple environment files can be configured without mixing variables between applications.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.