docker_stack_write
Create or replace a Docker Compose stack file, validate it with docker compose config, and restore the prior file if validation fails. Does not start services.
Instructions
Create a new stack, or replace the compose file of one, then check it. Needs confirm=true.
The file goes to //compose.yaml (an existing compose file keeps its name).
The result is checked with docker compose config. If the check fails, the old file is put back
(or the new file removed) and the error is shown. Nothing is started: use docker_stack_action up.
Secret values should be ${VARIABLES} that live in the .env file (write that with server_file_write).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | ||
| stack | Yes | ||
| confirm | No | ||
| content | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |