-
Notifications
You must be signed in to change notification settings - Fork 12
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
Make common commands easier #3
Comments
Here are my thoughts. I think docker-compose mixin should at least support the most used docker-compose commands. I have in mind:
If someone wants another command, this could be done later. At least, these commands subset could fulfill a lot of use cases right now. For each command, the docker-compose mixin could provide the following (but not complete) syntaxes:
docker-compose:
description: "Run services"
command: up
services:
- serviceA
- serviceB
recreate: true # Implies `--force-recreate`
build: true # Implies `----build`
remove-orphans: true # Implies `--remove-orphans`
docker-compose:
description: "Shutdown services"
command: down
volumes: true # Implies `--volumes`
remove-orphans: true # Implies `--remove-orphans`
docker-compose:
description: "Pull services"
command: pull
services:
- serviceA
- serviceB |
The thoughts above look great to me! One thing on the flags with comments -- they seem to be inverted? Currently, for example:
I would assume if |
Exactly, this is was I was trying to say by using the I updated the example to reflect the comment, but it does not reflect the default value. |
@vdice The discussion we are doing here (getporter/docker-mixin#34) could be replicate dor docker-compose once we agree on the best approach. |
@jaudiger Yes, as it sounds like getporter/docker-mixin#34 (comment) is the preferred approach, we can certainly implement this similarly, with each supported command a first-class yaml field e.g.
|
Let's think about if we could have the mixin make common commands easier to run, and with less yaml. Sometimes, for example with helm, this gave us an opportunity to add logic that adapted an imperative CLI to a more state driven experience to improve how the mixin worked over just using the CLI directly.
For example here is
up
command:Perhaps we could agree on a set of useful default when running docker-compose in a bundle, like you will usually want to run with --detach, and should not do color output because Porter doesn't support it.
Questions
command: up
vs something likeor
The text was updated successfully, but these errors were encountered: