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

Add compose to the names of docker compose files #4983

Closed
mfosterw opened this issue Apr 11, 2024 · 3 comments · Fixed by #4995
Closed

Add compose to the names of docker compose files #4983

mfosterw opened this issue Apr 11, 2024 · 3 comments · Fixed by #4995

Comments

@mfosterw
Copy link
Contributor

Description

local.yml, production.yml, and docs.yml should be renamed something with "compose" in it: I propose docker-compose.*

Rationale

The VSCode Docker extension needs "compose" in the filename to detect a docker compose file. This lets you right click on the file to run compose commands using it. Also, it puts the files next to each other alphabetically, and perhaps most importantly, more clearly communicates the purpose of the files.

@browniebroke
Copy link
Member

I like the suggestion.

The main drawback would be that commands would be longer to type in the terminal. That can be fixed by wrapping the command in an alias or behind a tool like Makefile, or using launch configuration in IDE.

All the benefits you listed outweight this drawback in my opinion.

@foarsitter
Copy link
Collaborator

The main drawback would be that commands would be longer to type in the terminal. That can be fixed by wrapping the command in an alias or behind a tool like Makefile, or using launch configuration in IDE.

The COMPOSE_FILE env var may tackle that issue.

I like the suggestion to so the files are grouped together if we name them like docker-compose.production.yml.

@mfosterw
Copy link
Contributor Author

I have been using this in my project and using the COMPOSE_FILE variable to improve convenience. I'll work on a PR for this soon, should be very quick.

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

Successfully merging a pull request may close this issue.

3 participants