Skip to content

Commit 2cc04fa

Browse files
committed
docs: document all flags in readme
1 parent b335d9c commit 2cc04fa

File tree

2 files changed

+59
-6
lines changed

2 files changed

+59
-6
lines changed

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ Help for any commands can be displayed by specifying the command as an argument
6363
dokku postgres:create <service> [--create-flags...]
6464
```
6565

66+
flags:
67+
68+
- `-C|--custom-env "USER=alpha;HOST=beta"`: semi-colon delimited environment variables to start the service with
69+
- `-i|--image IMAGE`: the image name to start the service with
70+
- `-I|--image-version IMAGE_VERSION`: the image version to start the service with
71+
- `-p|--password PASSWORD`: override the user-level service password
72+
- `-r|--root-password PASSWORD`: override the root-level service password
73+
6674
Create a postgres service named lolipop:
6775

6876
```shell
@@ -91,6 +99,19 @@ dokku postgres:create lolipop
9199
dokku postgres:info <service> [--single-info-flag]
92100
```
93101

102+
flags:
103+
104+
- `--config-dir`: show the service configuration directory
105+
- `--data-dir`: show the service data directory
106+
- `--dsn`: show the service DSN
107+
- `--exposed-ports`: show service exposed ports
108+
- `--id`: show the service container id
109+
- `--internal-ip`: show the service internal ip
110+
- `--links`: show the service app links
111+
- `--service-root`: show the service root directory
112+
- `--status`: show the service running status
113+
- `--version`: show the service image version
114+
94115
Get connection information as follows:
95116

96117
```shell
@@ -132,6 +153,10 @@ dokku postgres:list
132153
dokku postgres:logs <service> [-t|--tail]
133154
```
134155

156+
flags:
157+
158+
- `-t|--tail`: do not stop when end of the logs are reached and wait for additional output
159+
135160
You can tail logs for a particular service:
136161

137162
```shell
@@ -151,6 +176,11 @@ dokku postgres:logs lolipop --tail
151176
dokku postgres:link <service> <app> [--link-flags...]
152177
```
153178

179+
flags:
180+
181+
- `-a|--alias "BLUE_DATABASE"`: an alternative alias to use for linking to an app via environment variable
182+
- `-q|--querystring "pool=5"`: ampersand delimited querystring arguments to append to the service link
183+
154184
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.
155185

156186
> NOTE: this will restart your app
@@ -347,6 +377,13 @@ dokku postgres:restart lolipop
347377
dokku postgres:upgrade <service> [--upgrade-flags...]
348378
```
349379

380+
flags:
381+
382+
- `-C|--custom-env "USER=alpha;HOST=beta"`: semi-colon delimited environment variables to start the service with
383+
- `-i|--image IMAGE`: the image name to start the service with
384+
- `-I|--image-version IMAGE_VERSION`: the image version to start the service with
385+
- `-R|--restart-apps "true"`: whether to force an app restart
386+
350387
You can upgrade an existing service to a new image or image-version:
351388

352389
```shell
@@ -377,6 +414,14 @@ dokku postgres:app-links playground
377414
dokku postgres:clone <service> <new-service> [--clone-flags...]
378415
```
379416

417+
flags:
418+
419+
- `-C|--custom-env "USER=alpha;HOST=beta"`: semi-colon delimited environment variables to start the service with
420+
- `-i|--image IMAGE`: the image name to start the service with
421+
- `-I|--image-version IMAGE_VERSION`: the image version to start the service with
422+
- `-p|--password PASSWORD`: override the user-level service password
423+
- `-r|--root-password PASSWORD`: override the root-level service password
424+
380425
You can clone an existing service to a new one:
381426

382427
```shell
@@ -517,6 +562,10 @@ dokku postgres:backup-deauth lolipop
517562
dokku postgres:backup <service> <bucket-name> [--use-iam]
518563
```
519564

565+
flags:
566+
567+
- `-u|--use-iam`: use the IAM profile associated with the current server
568+
520569
Backup the 'lolipop' service to the 'my-s3-bucket' bucket on aws:
521570

522571
```shell
@@ -556,6 +605,10 @@ dokku postgres:backup-unset-encryption lolipop
556605
dokku postgres:backup-schedule <service> <schedule> <bucket-name> [--use-iam]
557606
```
558607

608+
flags:
609+
610+
- `-u|--use-iam`: use the IAM profile associated with the current server
611+
559612
Schedule a backup:
560613

561614
> 'schedule' is a crontab expression, eg. "0 3 * * *" for each day at 3am

bin/generate

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,12 @@ def command_help(command, service, alias, scheme, ports, unimplemented):
226226
# for argument in data["arguments"]:
227227
# content.append(f"- {argument}")
228228

229-
# if len(data["flags"]) > 0:
230-
# content.append("")
231-
# content.append("flags:")
232-
# content.append("")
233-
# for flag in data["flags"]:
234-
# content.append(f"- {flag}")
229+
if len(data["flags"]) > 0:
230+
content.append("")
231+
content.append("flags:")
232+
content.append("")
233+
for flag in data["flags"]:
234+
content.append(f"- {flag}")
235235

236236
if len(data["examples"]) > 0:
237237
content.append("")

0 commit comments

Comments
 (0)