chain commands, and let a project refine a catalogue stack
myos build up logs host/fabio runs the three in order and stops at the first failure, the way make build up logs STACK=host/fabio did. Leading words that name commands are commands; the first word that is not one starts the stacks. A stack found in several directories of the stack path is now merged rather than shadowed, least specific first, so a project drops stack/postgres/postgres.local.yml next to the catalogue's postgres.yml and refines it. Settings hooks follow the same order, so a project can redefine a default the catalogue ships. Neither engine did this before: the project directory simply hid the catalogue one. An unknown command now says so and suggests the command to type, instead of printing the whole usage.
This commit is contained in:
+10
-3
@@ -48,6 +48,9 @@ myos down <stack> # remove the containers
|
||||
|
||||
A reference is `[<group>/]<name>[:<version>]`, or a path.
|
||||
|
||||
Commands chain: `myos build up logs host/fabio` runs the three in order and
|
||||
stops at the first failure.
|
||||
|
||||
```sh
|
||||
myos up # the current directory, when it holds a compose file
|
||||
myos up host # a group: expands to host/consul host/fabio ...
|
||||
@@ -57,9 +60,13 @@ myos -C /opt/app up # somewhere else
|
||||
myos -e master up # in another environment
|
||||
```
|
||||
|
||||
Stacks are looked up along the stack path, project first:
|
||||
`./stack`, `../stack`, `~/.local/share/myos/stack`, `/usr/local/share/myos/stack`,
|
||||
`/usr/share/myos/stack`. `myos doctor` prints the resolved path.
|
||||
Stacks are looked up along the stack path: `./stack`, `../stack`,
|
||||
`~/.local/share/myos/stack`, `/usr/local/share/myos/stack`, `/usr/share/myos/stack`.
|
||||
`myos doctor` prints the resolved path.
|
||||
|
||||
A stack found in several of them is **merged**, the project last, so a project
|
||||
adds `stack/postgres/postgres.local.yml` next to the catalogue's `postgres.yml`
|
||||
and refines it instead of replacing it. The same goes for the settings hooks.
|
||||
|
||||
## Three kinds of stack
|
||||
|
||||
|
||||
Reference in New Issue
Block a user