feat: add ability to skip restarts on link and unlink

Refs dokku/dokku-redis#192
This commit is contained in:
Jose Diaz-Gonzalez
2023-02-20 23:26:44 -05:00
parent 0b3b744d9b
commit 3e827e15f9
5 changed files with 26 additions and 5 deletions

View File

@@ -201,6 +201,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
- `-n|--no-restart "false"`: whether or not to restart the app on link (default: true)
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.
@@ -246,6 +247,12 @@ This will cause `MONGO_URL` to be set as:
mongodb2://lollipop:SOME_PASSWORD@dokku-mongo-lollipop:27017/lollipop
```
If you specify `MONGO_DATABASE_SCHEME` to equal `http`, we`ll also automatically adjust `MONGO_URL` to match the http interface:
```
http://lollipop:SOME_PASSWORD@dokku-mongo-lollipop:${PLUGIN_DATASTORE_PORTS[1]}
```
### unlink the mongo service from the app
```shell
@@ -253,6 +260,10 @@ mongodb2://lollipop:SOME_PASSWORD@dokku-mongo-lollipop:27017/lollipop
dokku mongo:unlink <service> <app>
```
flags:
- `-n|--no-restart "false"`: whether or not to restart the app on unlink (default: true)
You can unlink a mongo service:
> NOTE: this will restart your app and unset related environment variables
@@ -454,7 +465,7 @@ flags:
- `-I|--image-version IMAGE_VERSION`: the image version to start the service with
- `-N|--initial-network INITIAL_NETWORK`: the initial network to attach the service to
- `-P|--post-create-network NETWORKS`: a comman-separated list of networks to attach the service container to after service creation
- `-R|--restart-apps "true"`: whether to force an app restart
- `-R|--restart-apps "true"`: whether or not to force an app restart (default: false)
- `-S|--post-start-network NETWORKS`: a comman-separated list of networks to attach the service container to after service start
- `-s|--shm-size SHM_SIZE`: override shared memory size for mongo docker container