docs: translate single-quotes into backticks

This commit is contained in:
Jose Diaz-Gonzalez
2021-09-12 07:01:57 -04:00
parent d480a76f07
commit e09524029e
2 changed files with 25 additions and 15 deletions

View File

@@ -78,7 +78,7 @@ Create a mongo service named lolipop:
dokku mongo:create lolipop
```
You can also specify the image and image version to use for the service. It *must* be compatible with the mongo image.
You can also specify the image and image version to use for the service. It *must* be compatible with the mongo image.
```shell
export MONGO_IMAGE="mongo"
@@ -86,7 +86,7 @@ export MONGO_IMAGE_VERSION="${PLUGIN_IMAGE_VERSION}"
dokku mongo:create lolipop
```
You can also specify custom environment variables to start the mongo service in semi-colon separated form.
You can also specify custom environment variables to start the mongo service in semi-colon separated form.
```shell
export MONGO_CUSTOM_ENV="USER=alpha;HOST=beta"
@@ -182,7 +182,7 @@ 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 mongo 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 mongo 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
@@ -207,13 +207,13 @@ The following will be set on the linked application by default:
MONGO_URL=mongodb://lolipop:SOME_PASSWORD@dokku-mongo-lolipop:27017/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
dokku mongo:link other_service playground
```
It is possible to change the protocol for `MONGO_URL` by setting the environment variable `MONGO_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 `MONGO_URL` by setting the environment variable `MONGO_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
dokku config:set playground MONGO_DATABASE_SCHEME=mongodb2
@@ -265,13 +265,13 @@ dokku mongo:connect lolipop
dokku mongo: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
dokku mongo: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
dokku mongo:enter lolipop touch /tmp/test
@@ -402,7 +402,7 @@ Service scripting can be executed using the following commands:
dokku mongo:app-links <app>
```
List all mongo services that are linked to the 'playground' app.
List all mongo services that are linked to the `playground` app.
```shell
dokku mongo:app-links playground
@@ -436,7 +436,7 @@ dokku mongo:clone lolipop lolipop-2
dokku mongo:exists <service>
```
Here we check if the lolipop mongo service exists.
Here we check if the lolipop mongo service exists.
```shell
dokku mongo:exists lolipop
@@ -449,7 +449,7 @@ dokku mongo:exists lolipop
dokku mongo:linked <service> <app>
```
Here we check if the lolipop mongo service is linked to the 'playground' app.
Here we check if the lolipop mongo service is linked to the `playground` app.
```shell
dokku mongo:linked lolipop playground
@@ -462,7 +462,7 @@ dokku mongo:linked lolipop playground
dokku mongo:links <service>
```
List all apps linked to the 'lolipop' mongo service.
List all apps linked to the `lolipop` mongo service.
```shell
dokku mongo:links lolipop
@@ -567,12 +567,18 @@ 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`:`
Backup the `lolipop` service to the `my-s3-bucket` bucket on `AWS`:`
```shell
dokku mongo:backup lolipop my-s3-bucket --use-iam
```
Restore a backup file (assuming it was extracted via `tar -xf backup.tgz`):
```shell
dokku mongo:import lolipop < backup-folder/export
```
### sets encryption for all future backups of mongo service
```shell

View File

@@ -423,13 +423,13 @@ def command_data(command, service, variable, alias, image, scheme, ports):
def process_sentence(sentence_lines):
sentence_lines = " ".join(sentence_lines)
sentences = ". ".join(
upperfirst(i.strip()) for i in sentence_lines.split(".")
upperfirst(i.strip()) for i in sentence_lines.split(". ")
).strip()
if not sentences.endswith(".") and not sentences.endswith(":"):
sentences += ":"
text = []
for sentence in sentences.split("."):
for sentence in sentences.split(". "):
parts = []
for word in sentence.strip().split(" "):
if word.isupper() and len(word) > 1:
@@ -444,7 +444,11 @@ def process_sentence(sentence_lines):
text = ". ".join(text)
# 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