Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ FLAGS
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the
context
-q, --quiet suppress process output and only display a machine-readable summary
-s, --stack-id=<value> ID of the stack to operate on
-v, --volume=<value>... bind mount a volume to the container
--cpus=<value> set CPU limit for the container
--create-volumes automatically create named volumes that do not exist
Expand Down Expand Up @@ -568,6 +569,11 @@ FLAG DESCRIPTIONS
This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in
scripts), you can use this flag to easily get the IDs of created resources for further processing.

-s, --stack-id=<value> ID of the stack to operate on

If omitted, the stack set in the CLI context is used; when that is not set either, the project's default stack is
used.

-v, --volume=<value>... bind mount a volume to the container

This flag can be used to add volume mounts to the container. It can be used multiple times to mount multiple
Expand Down
228 changes: 228 additions & 0 deletions docs/stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,86 @@

Manage container stacks

* [`mw stack create`](#mw-stack-create)
* [`mw stack delete [STACK-ID]`](#mw-stack-delete-stack-id)
* [`mw stack deploy`](#mw-stack-deploy)
* [`mw stack list`](#mw-stack-list)
* [`mw stack ls`](#mw-stack-ls)
* [`mw stack ps`](#mw-stack-ps)
* [`mw stack rm [STACK-ID]`](#mw-stack-rm-stack-id)
* [`mw stack set-update-schedule STACK-ID SCHEDULE`](#mw-stack-set-update-schedule-stack-id-schedule)
* [`mw stack template install TEMPLATE-ID`](#mw-stack-template-install-template-id)
* [`mw stack template list`](#mw-stack-template-list)
* [`mw stack template ls`](#mw-stack-template-ls)
* [`mw stack unset-update-schedule STACK-ID`](#mw-stack-unset-update-schedule-stack-id)
* [`mw stack up`](#mw-stack-up)

## `mw stack create`

Create a new container stack

```
USAGE
$ mw stack create -d <value> [--token <value>] [-p <value>] [-q] [--input <value>... --from-template <value>]
[-c]

FLAGS
-c, --update-context update the CLI context to use the newly created stack
-d, --description=<value> (required) description of the stack
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the
context
-q, --quiet suppress process output and only display a machine-readable summary
--from-template=<value> ID of a container template to create the stack from
--input=<value>... user input for a template, in 'name=value' format

AUTHENTICATION FLAGS
--token=<value> API token to use for authentication (overrides environment and config file). NOTE: watch out that
tokens passed via this flag might be logged in your shell history.

DESCRIPTION
Create a new container stack

Creates a new, empty container stack, or a stack based on a container template.

When --from-template is given, the referenced template may define user inputs. These can be supplied non-interactively
with one or more --input flags in 'name=value' format; any required inputs that are neither provided nor have a
default value are prompted for interactively.

Use "mw stack template list" to discover available templates and their IDs. To add a template to a stack that already
exists, use "mw stack template install" instead.

EXAMPLES
Create an empty stack

$ mw stack create --description "my stack"

Create a stack from a template, providing user inputs

$ mw stack create --description "my n8n" --from-template <template-id> --input DOMAIN=example.com --input \
ADMIN_EMAIL=admin@example.com

FLAG DESCRIPTIONS
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the context

May contain a short ID or a full ID of a project; you can also use the "mw context set --project-id=<VALUE>" command
to persistently set a default project for all commands that accept this flag.

-q, --quiet suppress process output and only display a machine-readable summary

This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in
scripts), you can use this flag to easily get the IDs of created resources for further processing.

--from-template=<value> ID of a container template to create the stack from

When set, the stack is created from the given container template. Omit this flag to create an empty stack.

--input=<value>... user input for a template, in 'name=value' format

May be repeated to provide multiple inputs. Only applicable together with --from-template. Required inputs that are
not provided (and have no default) are prompted for interactively.
```


## `mw stack delete [STACK-ID]`

Delete a container stack
Expand Down Expand Up @@ -44,6 +114,11 @@ FLAG DESCRIPTIONS

This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in
scripts), you can use this flag to easily get the IDs of created resources for further processing.

-v, --with-volumes also include remove volumes in removal

Only relevant for a project's default stack, which is emptied instead of removed; the volumes of any other stack are
removed together with the stack itself.
```


Expand Down Expand Up @@ -90,6 +165,8 @@ FLAG DESCRIPTIONS

--from-template=<value> deploy from a GitHub template (e.g., mittwald/n8n)

DEPRECATED: use "mw stack create --from-template" instead. This flag uses an older, GitHub-based template mechanism.

Fetch and deploy a stack from a GitHub template repository. Template names are automatically converted to repository
names by prefixing "stack-template-" to the name part.

Expand Down Expand Up @@ -248,6 +325,11 @@ FLAG DESCRIPTIONS

This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in
scripts), you can use this flag to easily get the IDs of created resources for further processing.

-v, --with-volumes also include remove volumes in removal

Only relevant for a project's default stack, which is emptied instead of removed; the volumes of any other stack are
removed together with the stack itself.
```

## `mw stack set-update-schedule STACK-ID SCHEDULE`
Expand Down Expand Up @@ -281,6 +363,150 @@ FLAG DESCRIPTIONS
```


## `mw stack template install TEMPLATE-ID`

Install a template into an existing container stack

```
USAGE
$ mw stack template install TEMPLATE-ID [--token <value>] [-s <value>] [-q] [--input <value>...]

ARGUMENTS
TEMPLATE-ID ID of the container template to install

FLAGS
-q, --quiet suppress process output and only display a machine-readable summary
-s, --stack-id=<value> ID of a stack; this flag is optional if a default stack is set in the context
--input=<value>... user input for the template, in 'name=value' format

AUTHENTICATION FLAGS
--token=<value> API token to use for authentication (overrides environment and config file). NOTE: watch out that
tokens passed via this flag might be logged in your shell history.

DESCRIPTION
Install a template into an existing container stack

Adds the services and volumes of a container template to a stack that already exists, instead of creating a new stack
for it.

This is intended for templates of type "component"; use "mw stack create --from-template" to create a new stack from a
standalone template.

Template user inputs can be supplied non-interactively with one or more --input flags in 'name=value' format; any
required inputs that are neither provided nor have a default value are prompted for interactively.

EXAMPLES
Install a template into the stack from the current context

$ mw stack template install <template-id>

Install a template into a specific stack, with inputs

$ mw stack template install <template-id> --stack-id <stack-id> --input DB_NAME=mydb

FLAG DESCRIPTIONS
-q, --quiet suppress process output and only display a machine-readable summary

This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in
scripts), you can use this flag to easily get the IDs of created resources for further processing.

-s, --stack-id=<value> ID of a stack; this flag is optional if a default stack is set in the context

May contain a ID of a stack; you can also use the "mw context set --stack-id=<VALUE>" command to persistently set a
default stack for all commands that accept this flag.

--input=<value>... user input for the template, in 'name=value' format

May be repeated to provide multiple inputs. Required inputs that are not provided (and have no default) are prompted
for interactively.
```


## `mw stack template list`

List container templates that stacks can be created from.

```
USAGE
$ mw stack template list -o txt|json|yaml|csv|tsv [--token <value>] [-x] [--no-header] [--no-truncate]
[--no-relative-dates] [--csv-separator ,|;] [--category <value>] [--type component|standalone]

FLAGS
-o, --output=<option> (required) [default: txt] output in a more machine friendly format
<options: txt|json|yaml|csv|tsv>
-x, --extended show extended information
--category=<value> only list templates belonging to the given category
--csv-separator=<option> [default: ,] separator for CSV output (only relevant for CSV output)
<options: ,|;>
--no-header hide table header
--no-relative-dates show dates in absolute format, not relative (only relevant for txt output)
--no-truncate do not truncate output (only relevant for txt output)
--type=<option> only list templates of the given type
<options: component|standalone>

AUTHENTICATION FLAGS
--token=<value> API token to use for authentication (overrides environment and config file). NOTE: watch out that
tokens passed via this flag might be logged in your shell history.

DESCRIPTION
List container templates that stacks can be created from.

ALIASES
$ mw stack template ls

EXAMPLES
List all templates of a given category

$ mw stack template list --category cms

List only standalone templates

$ mw stack template list --type standalone
```


## `mw stack template ls`

List container templates that stacks can be created from.

```
USAGE
$ mw stack template ls -o txt|json|yaml|csv|tsv [--token <value>] [-x] [--no-header] [--no-truncate]
[--no-relative-dates] [--csv-separator ,|;] [--category <value>] [--type component|standalone]

FLAGS
-o, --output=<option> (required) [default: txt] output in a more machine friendly format
<options: txt|json|yaml|csv|tsv>
-x, --extended show extended information
--category=<value> only list templates belonging to the given category
--csv-separator=<option> [default: ,] separator for CSV output (only relevant for CSV output)
<options: ,|;>
--no-header hide table header
--no-relative-dates show dates in absolute format, not relative (only relevant for txt output)
--no-truncate do not truncate output (only relevant for txt output)
--type=<option> only list templates of the given type
<options: component|standalone>

AUTHENTICATION FLAGS
--token=<value> API token to use for authentication (overrides environment and config file). NOTE: watch out that
tokens passed via this flag might be logged in your shell history.

DESCRIPTION
List container templates that stacks can be created from.

ALIASES
$ mw stack template ls

EXAMPLES
List all templates of a given category

$ mw stack template ls --category cms

List only standalone templates

$ mw stack template ls --type standalone
```

## `mw stack unset-update-schedule STACK-ID`

Unset the update schedule of a container stack
Expand Down Expand Up @@ -353,6 +579,8 @@ FLAG DESCRIPTIONS

--from-template=<value> deploy from a GitHub template (e.g., mittwald/n8n)

DEPRECATED: use "mw stack create --from-template" instead. This flag uses an older, GitHub-based template mechanism.

Fetch and deploy a stack from a GitHub template repository. Template names are automatically converted to repository
names by prefixing "stack-template-" to the name part.

Expand Down
Loading
Loading