Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify filename to use for new stacks #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RichyHBM
Copy link

This PR adds feature #79 allowing users to specify what filename to use for new compose stacks

@RyanBalfanz
Copy link
Contributor

Why do you need this functionality? What is your use case? Do you have existing files that you want to reuse? Or do you want to control the names of the files created by Dockge?

BTW Docker Compose supports a COMPOSE_FILE env var: https://docs.docker.com/compose/environment-variables/envvars/#compose_file. I don't know how Dockge executes commands internally, so I am not sure if it uses this mechanism or if it builds commands using _composeFileName (in which case it might be better to use COMPOSE_FILE instead).

@RichyHBM
Copy link
Author

Most of my current docker compose files are docker-compose.yml, where as any new ones created via dockge are compose.yaml

@RyanBalfanz
Copy link
Contributor

I'm not the maintainer so I have little say in this change, but I don't think that there's enough value-add or community demand yet to support this change. Additionally, adding such a change has an ongoing maintenance cost.

Rather, on the read side, Dockage could follow what Compose does (https://docs.docker.com/compose/environment-variables/envvars/#compose_file):

Default behavior: If not provided, Compose looks for a file named compose.yaml or docker-compose.yaml in the current directory and, if not found, then Compose searches each parent directory recursively until a file by that name is found.
Dockage users would then be expected to follow the existing Compose conventions.
I also already mentioned the COMPOSE_FILE env var previously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants