Support defining profiles on includes
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38.2k
- Forks
- 5.8k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 55
Description
Description
The ability to "include" a compose file into a parent file is incredibly powerful for supporting modular compose configurations. However, a key missing feature is the ability to add a global profile to the included file from the parent compose file.
Our use case is having multiple the ability to split a super compose file into separate child compose files, but allowing control over which child compose files are started by default. For example, we have a parent compose file that spins up most of the stack needed for resting. However, we have a separate compose file for the components related to our internal dashboard (this includes frontend, backend, and agent services). We would like the ability to optionally start the dashboard services from the main compose file when needed.
While we could define the profile on services in the "child" compose file, this is not desirable as then the child compose file can no longer be independently used without always starting the profile.
The ideal solution would be to add profiles as a configuration key alongside path under include and automatically extend all services from the included configuration with the defined profiles.
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
No file, test, or entry point is named. Start by tracing Compose's include and profile configuration handling, then check how included services are merged. Done means an include entry can define profiles in the parent while the child file remains independently usable, with coverage for starting the included services with and without that profile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, go
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100