feat: add json output format support to storage:list
This will allow the command to be used in a programmatic fashion.
This commit is contained in:
@@ -6,7 +6,7 @@ The preferred method to mount external containers to a Dokku managed container,
|
||||
|
||||
```
|
||||
storage:ensure-directory [--chown option] <directory> # Creates a persistent storage directory in the recommended storage path
|
||||
storage:list <app> # List bind mounts for app's container(s) (host:container)
|
||||
storage:list <app> [--format text|json] # List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir> # Create a new bind mount
|
||||
storage:report [<app>] [<flag>] # Displays a checks report for one or more apps
|
||||
storage:unmount <app> <host-dir:container-dir> # Remove an existing bind mount
|
||||
@@ -34,6 +34,23 @@ dokku storage:list node-js-app
|
||||
/var/lib/dokku/data/storage/node-js-app:/app/storage
|
||||
```
|
||||
|
||||
The output format can also be set to `json` for programmatic access:
|
||||
|
||||
|
||||
```shell
|
||||
dokku storage:list node-js-app --format json
|
||||
```
|
||||
|
||||
```
|
||||
[
|
||||
{
|
||||
"host_path": "/var/lib/dokku/data/storage/node-js-app",
|
||||
"container_path": "/app/storage",
|
||||
"volume_options": ""
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Creating storage directories
|
||||
|
||||
> New as of 0.25.5
|
||||
|
||||
@@ -2424,7 +2424,7 @@ DOKKU_SCHEDULER="$1"; APP="$2"; REMOVE_CONTAINERS="$3";
|
||||
|
||||
- Description: Returns a list of storage mounts
|
||||
- Invoked by: `dokku storage:list` and `dokku deploy`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP $PHASE $FORMAT`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
|
||||
Reference in New Issue
Block a user