Attaches or detaches storage on a dokku application
Supported.
Partial - the mount source, container path, and volume options are probed; phases, process_type, subpath, readonly, and volume_chown apply at mount time and are not drift-detected.
Keyed by app and container_dir. Fields left empty are omitted from the address.
| Parameter | Type | Required | Default | Choices | Description |
|---|---|---|---|---|---|
app |
string | yes | Name of the app | ||
entry_name |
string | no | Named storage registry entry to attach (mutually exclusive with host_dir) | ||
host_dir |
string | no | Host directory to mount in the legacy bind-mount form (mutually exclusive with entry_name) | ||
container_dir |
string | yes | Container directory to mount | ||
phases |
list | no | Deployment phases the attachment applies to (deploy, run). Empty defers to the dokku default. | ||
process_type |
string | no | Process type the attachment applies to | ||
subpath |
string | no | Subpath within the entry to mount | ||
readonly |
bool | no | Mount the attachment as read-only | ||
volume_chown |
string | no | Chown option applied to the volume at mount time | ||
volume_options |
string | no | Comma-separated mount options applied to the attachment (e.g. 'Z' for SELinux, 'noexec,nosuid', NFS opts) | ||
state |
string | no | present | present, absent | Desired state of the storage |
dokku_storage_mount:
app: node-js-app
entry_name: node-js-app-data
container_dir: /app/storagedokku_storage_mount:
app: node-js-app
entry_name: node-js-app-data
container_dir: /app/storage
phases:
- deploy
process_type: web
readonly: truedokku_storage_mount:
app: node-js-app
host_dir: /var/lib/dokku/data/storage/node-js-app
container_dir: /app/storagedokku_storage_mount:
app: node-js-app
host_dir: /var/lib/dokku/data/storage/node-js-app
container_dir: /app/storage
volume_options: Zdokku_storage_mount:
app: node-js-app
entry_name: node-js-app-data
container_dir: /app/storage
volume_options: noexec,nosuiddokku_storage_mount:
app: node-js-app
entry_name: node-js-app-data
container_dir: /app/storage
state: absentAvailable after the task runs when captured with register:, referenced as result.<Key> (or registered.<name>.<Key>).
| Key | Returned | Type | Description |
|---|---|---|---|
Changed |
always | bool | Whether the task changed server state. |
State |
always | string | Resulting state of the resource. |
DesiredState |
always | string | The state the task targeted. |
Message |
always | string | Human-readable result message (may be empty). |
Commands |
when a subprocess ran | list | Resolved dokku command lines executed. |
Stdout |
when a subprocess ran | string | Captured stdout of the final command. |
Stderr |
when a subprocess ran | string | Captured stderr of the final command. |
ExitCode |
when a subprocess ran | int | Exit code of the final command. |