docs: translate single-quotes into backticks

This commit is contained in:
Jose Diaz-Gonzalez
2021-09-12 07:01:59 -04:00
parent 3aed82c9d7
commit 17a640e764
2 changed files with 25 additions and 15 deletions

View File

@@ -77,7 +77,7 @@ Create a redis service named lolipop:
dokku redis:create lolipop dokku redis:create lolipop
``` ```
You can also specify the image and image version to use for the service. It *must* be compatible with the redis image. You can also specify the image and image version to use for the service. It *must* be compatible with the redis image.
```shell ```shell
export REDIS_IMAGE="redis" export REDIS_IMAGE="redis"
@@ -85,7 +85,7 @@ export REDIS_IMAGE_VERSION="${PLUGIN_IMAGE_VERSION}"
dokku redis:create lolipop dokku redis:create lolipop
``` ```
You can also specify custom environment variables to start the redis service in semi-colon separated form. You can also specify custom environment variables to start the redis service in semi-colon separated form.
```shell ```shell
export REDIS_CUSTOM_ENV="USER=alpha;HOST=beta" export REDIS_CUSTOM_ENV="USER=alpha;HOST=beta"
@@ -181,7 +181,7 @@ flags:
- `-a|--alias "BLUE_DATABASE"`: an alternative alias to use for linking to an app via environment variable - `-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 - `-q|--querystring "pool=5"`: ampersand delimited querystring arguments to append to the service link
A redis 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. A redis 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 > NOTE: this will restart your app
@@ -206,13 +206,13 @@ The following will be set on the linked application by default:
REDIS_URL=redis://:SOME_PASSWORD@dokku-redis-lolipop:6379/lolipop REDIS_URL=redis://:SOME_PASSWORD@dokku-redis-lolipop:6379/lolipop
``` ```
The host exposed here only works internally in docker containers. If you want your container to be reachable from outside, you should use the 'expose' subcommand. Another service can be linked to your app: The host exposed here only works internally in docker containers. If you want your container to be reachable from outside, you should use the `expose` subcommand. Another service can be linked to your app:
```shell ```shell
dokku redis:link other_service playground dokku redis:link other_service playground
``` ```
It is possible to change the protocol for `REDIS_URL` by setting the environment variable `REDIS_DATABASE_SCHEME` on the app. Doing so will after linking will cause the plugin to think the service is not linked, and we advise you to unlink before proceeding. It is possible to change the protocol for `REDIS_URL` by setting the environment variable `REDIS_DATABASE_SCHEME` on the app. Doing so will after linking will cause the plugin to think the service is not linked, and we advise you to unlink before proceeding.
```shell ```shell
dokku config:set playground REDIS_DATABASE_SCHEME=redis2 dokku config:set playground REDIS_DATABASE_SCHEME=redis2
@@ -264,13 +264,13 @@ dokku redis:connect lolipop
dokku redis:enter <service> dokku redis:enter <service>
``` ```
A bash prompt can be opened against a running service. Filesystem changes will not be saved to disk. A bash prompt can be opened against a running service. Filesystem changes will not be saved to disk.
```shell ```shell
dokku redis:enter lolipop dokku redis:enter lolipop
``` ```
You may also run a command directly against the service. Filesystem changes will not be saved to disk. You may also run a command directly against the service. Filesystem changes will not be saved to disk.
```shell ```shell
dokku redis:enter lolipop touch /tmp/test dokku redis:enter lolipop touch /tmp/test
@@ -401,7 +401,7 @@ Service scripting can be executed using the following commands:
dokku redis:app-links <app> dokku redis:app-links <app>
``` ```
List all redis services that are linked to the 'playground' app. List all redis services that are linked to the `playground` app.
```shell ```shell
dokku redis:app-links playground dokku redis:app-links playground
@@ -435,7 +435,7 @@ dokku redis:clone lolipop lolipop-2
dokku redis:exists <service> dokku redis:exists <service>
``` ```
Here we check if the lolipop redis service exists. Here we check if the lolipop redis service exists.
```shell ```shell
dokku redis:exists lolipop dokku redis:exists lolipop
@@ -448,7 +448,7 @@ dokku redis:exists lolipop
dokku redis:linked <service> <app> dokku redis:linked <service> <app>
``` ```
Here we check if the lolipop redis service is linked to the 'playground' app. Here we check if the lolipop redis service is linked to the `playground` app.
```shell ```shell
dokku redis:linked lolipop playground dokku redis:linked lolipop playground
@@ -461,7 +461,7 @@ dokku redis:linked lolipop playground
dokku redis:links <service> dokku redis:links <service>
``` ```
List all apps linked to the 'lolipop' redis service. List all apps linked to the `lolipop` redis service.
```shell ```shell
dokku redis:links lolipop dokku redis:links lolipop
@@ -566,12 +566,18 @@ flags:
- `-u|--use-iam`: use the IAM profile associated with the current server - `-u|--use-iam`: use the IAM profile associated with the current server
Backup the 'lolipop' service to the 'my-s3-bucket' bucket on ``AWS`:` Backup the `lolipop` service to the `my-s3-bucket` bucket on `AWS`:`
```shell ```shell
dokku redis:backup lolipop my-s3-bucket --use-iam dokku redis:backup lolipop my-s3-bucket --use-iam
``` ```
Restore a backup file (assuming it was extracted via `tar -xf backup.tgz`):
```shell
dokku redis:import lolipop < backup-folder/export
```
### sets encryption for all future backups of redis service ### sets encryption for all future backups of redis service
```shell ```shell

View File

@@ -423,13 +423,13 @@ def command_data(command, service, variable, alias, image, scheme, ports):
def process_sentence(sentence_lines): def process_sentence(sentence_lines):
sentence_lines = " ".join(sentence_lines) sentence_lines = " ".join(sentence_lines)
sentences = ". ".join( sentences = ". ".join(
upperfirst(i.strip()) for i in sentence_lines.split(".") upperfirst(i.strip()) for i in sentence_lines.split(". ")
).strip() ).strip()
if not sentences.endswith(".") and not sentences.endswith(":"): if not sentences.endswith(".") and not sentences.endswith(":"):
sentences += ":" sentences += ":"
text = [] text = []
for sentence in sentences.split("."): for sentence in sentences.split(". "):
parts = [] parts = []
for word in sentence.strip().split(" "): for word in sentence.strip().split(" "):
if word.isupper() and len(word) > 1: if word.isupper() and len(word) > 1:
@@ -444,7 +444,11 @@ def process_sentence(sentence_lines):
text = ". ".join(text) text = ". ".join(text)
# some cleanup # some cleanup
text = text.replace("(0. 0. 0. 0)", "(`0.0.0.0`)") text = text.replace("(0.0.0.0)", "(`0.0.0.0`)")
text = text.replace("'", "`")
text = text.replace("`s", "'s")
text = text.replace("``", "`")
text = text.strip(" ")
return text return text