docs: document all flags in readme

This commit is contained in:
Jose Diaz-Gonzalez
2020-05-14 23:37:57 -04:00
parent b335d9c73a
commit 2cc04faf19
2 changed files with 59 additions and 6 deletions

View File

@@ -63,6 +63,14 @@ Help for any commands can be displayed by specifying the command as an argument
dokku postgres:create <service> [--create-flags...]
```
flags:
- `-C|--custom-env "USER=alpha;HOST=beta"`: semi-colon delimited environment variables to start the service with
- `-i|--image IMAGE`: the image name to start the service with
- `-I|--image-version IMAGE_VERSION`: the image version to start the service with
- `-p|--password PASSWORD`: override the user-level service password
- `-r|--root-password PASSWORD`: override the root-level service password
Create a postgres service named lolipop:
```shell
@@ -91,6 +99,19 @@ dokku postgres:create lolipop
dokku postgres:info <service> [--single-info-flag]
```
flags:
- `--config-dir`: show the service configuration directory
- `--data-dir`: show the service data directory
- `--dsn`: show the service DSN
- `--exposed-ports`: show service exposed ports
- `--id`: show the service container id
- `--internal-ip`: show the service internal ip
- `--links`: show the service app links
- `--service-root`: show the service root directory
- `--status`: show the service running status
- `--version`: show the service image version
Get connection information as follows:
```shell
@@ -132,6 +153,10 @@ dokku postgres:list
dokku postgres:logs <service> [-t|--tail]
```
flags:
- `-t|--tail`: do not stop when end of the logs are reached and wait for additional output
You can tail logs for a particular service:
```shell
@@ -151,6 +176,11 @@ dokku postgres:logs lolipop --tail
dokku postgres:link <service> <app> [--link-flags...]
```
flags:
- `-a|--alias "BLUE_DATABASE"`: an alternative alias to use for linking to an app via environment variable
- `-q|--querystring "pool=5"`: ampersand delimited querystring arguments to append to the service link
A postgres service can be linked to a container. This will use native docker links via the docker-options plugin. Here we link it to our 'playground' app.
> NOTE: this will restart your app
@@ -347,6 +377,13 @@ dokku postgres:restart lolipop
dokku postgres:upgrade <service> [--upgrade-flags...]
```
flags:
- `-C|--custom-env "USER=alpha;HOST=beta"`: semi-colon delimited environment variables to start the service with
- `-i|--image IMAGE`: the image name to start the service with
- `-I|--image-version IMAGE_VERSION`: the image version to start the service with
- `-R|--restart-apps "true"`: whether to force an app restart
You can upgrade an existing service to a new image or image-version:
```shell
@@ -377,6 +414,14 @@ dokku postgres:app-links playground
dokku postgres:clone <service> <new-service> [--clone-flags...]
```
flags:
- `-C|--custom-env "USER=alpha;HOST=beta"`: semi-colon delimited environment variables to start the service with
- `-i|--image IMAGE`: the image name to start the service with
- `-I|--image-version IMAGE_VERSION`: the image version to start the service with
- `-p|--password PASSWORD`: override the user-level service password
- `-r|--root-password PASSWORD`: override the root-level service password
You can clone an existing service to a new one:
```shell
@@ -517,6 +562,10 @@ dokku postgres:backup-deauth lolipop
dokku postgres:backup <service> <bucket-name> [--use-iam]
```
flags:
- `-u|--use-iam`: use the IAM profile associated with the current server
Backup the 'lolipop' service to the 'my-s3-bucket' bucket on aws:
```shell
@@ -556,6 +605,10 @@ dokku postgres:backup-unset-encryption lolipop
dokku postgres:backup-schedule <service> <schedule> <bucket-name> [--use-iam]
```
flags:
- `-u|--use-iam`: use the IAM profile associated with the current server
Schedule a backup:
> 'schedule' is a crontab expression, eg. "0 3 * * *" for each day at 3am