Multiple env files for compose
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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