[proposal] Add stack name to environment / allow substitution in compose file
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
I expect most naming conventions do leverage the name of the stack. Unfortunately, this name is not available for substitution in compose file. Since the stack name is known to any stack command, i propose to add the name of the stack as environment variable which can be used for substitution.
Example / Use case:
version: "3.7"
networks:
default:
external: true
name: ${STACK_NAME}_default
Side note: Rancher does provide a similar feature already (see https://github.com/rancher/rancher/issues/3393).
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
Review the stack command, where the stack name is known, and the compose-file substitution path. Confirm how an environment variable could expose that name for substitutions such as ${STACK_NAME}_default; done means the variable is available during stack deployment and the example resolves as expected. No source files or tests are named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100