-
Notifications
You must be signed in to change notification settings - Fork 522
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
Selecting multiple compose files with context menu "Compose Up" should execute them in a single command #1749
Comments
@slavdok I had thought of this also when working on the compose command customization, so you certainly aren't alone, but I didn't want to change the behavior present. One challenge is knowing the order to put them in--I don't think VSCode gives us any hint as to what order they were selected in, and alphabetical wouldn't always be right. |
Solution one: just like #569 fix, is to assume correct filenames, so Solution two: use the same functionality as selecting files for compare, where you mark one file first, then individually mark the second file for compare (I am sure at that point, VSCode knows which was first) Thanks for looking into this |
In the meantime, if you're hitting this issue pretty consistently for a single project or if you have a consistent pattern of files, you could customize the Compose command using this new mechanism for 1.0.0: https://code.visualstudio.com/docs/containers/reference#_command-customization For example, you could create two compose-up commands: "docker.commands.composeUp": [
{
"label": "Compose up with QA",
"template": "docker-compose ${configurationFile} -f docker-qa.yml up ${detached} ${build}"
},
{
"label": "Compose up without QA",
"template": "docker-compose ${configurationFile} up ${detached} ${build}"
}
] When you right-click the main |
This is documented here - https://code.visualstudio.com/docs/containers/docker-compose#_docker-compose-with-multiple-compose-files |
Maybe related to #569, but different.
It's now fixed that doing
Command Palette > Docker: Compose Up
will detect if there is an docker-compose.override.yml file, and will include that by runningdocker-compose up
without specifying a file.However when I select
docker-compose.yml
fromExplorer View > Right click > Compose up
, it still runsdocker-compose -f "$file" up
. This is probably by design.But what if I have
docker-compose.yml
,docker-compose.override.yml
anddocker-qa.yml
files. I would like to select 2 in the Explorer view (it supports that now), the default and the qa one, thenRight click > Compose up
, and would like to seedocker-compose -f "docker-compose.yml" -f "docker-qa.yml" up
command executed.Instead right now it launches each individually.
If this infringes on anyone's workflow, maybe make it a configurable option, like
-d
and--build
The text was updated successfully, but these errors were encountered: