docs: add a note as to how to specify an interface/ip to bind on when exposing a service
Closes dokku/dokku-mongo#128
This commit is contained in:
10
README.md
10
README.md
@@ -33,7 +33,7 @@ redis:destroy <service> [-f|--force] # delete the redis service/da
|
|||||||
redis:enter <service> # enter or run a command in a running redis service container
|
redis:enter <service> # enter or run a command in a running redis service container
|
||||||
redis:exists <service> # check if the redis service exists
|
redis:exists <service> # check if the redis service exists
|
||||||
redis:export <service> # export a dump of the redis service database
|
redis:export <service> # export a dump of the redis service database
|
||||||
redis:expose <service> <ports...> # expose a redis service on custom port if provided (random port otherwise)
|
redis:expose <service> <ports...> # expose a redis service on custom host:port if provided (random port on the 0.0.0.0 interface if otherwise unspecified)
|
||||||
redis:import <service> # import a dump into the redis service database
|
redis:import <service> # import a dump into the redis service database
|
||||||
redis:info <service> [--single-info-flag] # print the service information
|
redis:info <service> [--single-info-flag] # print the service information
|
||||||
redis:link <service> <app> [--link-flags...] # link the redis service to the app
|
redis:link <service> <app> [--link-flags...] # link the redis service to the app
|
||||||
@@ -276,7 +276,7 @@ You may also run a command directly against the service. Filesystem changes will
|
|||||||
dokku redis:enter lolipop touch /tmp/test
|
dokku redis:enter lolipop touch /tmp/test
|
||||||
```
|
```
|
||||||
|
|
||||||
### expose a redis service on custom port if provided (random port otherwise)
|
### expose a redis service on custom host:port if provided (random port on the 0.0.0.0 interface if otherwise unspecified)
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# usage
|
# usage
|
||||||
@@ -289,6 +289,12 @@ Expose the service on the service's normal ports, allowing access to it from the
|
|||||||
dokku redis:expose lolipop 6379
|
dokku redis:expose lolipop 6379
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Expose the service on the service's normal ports, with the first on a specified ip adddress (127.0.0.1):
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku redis:expose lolipop 127.0.0.1:6379
|
||||||
|
```
|
||||||
|
|
||||||
### unexpose a previously exposed redis service
|
### unexpose a previously exposed redis service
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
@@ -8,9 +8,11 @@ source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/functions"
|
|||||||
service-expose-cmd() {
|
service-expose-cmd() {
|
||||||
#E expose the service on the service's normal ports, allowing access to it from the public interface (0.0.0.0)
|
#E expose the service on the service's normal ports, allowing access to it from the public interface (0.0.0.0)
|
||||||
#E dokku $PLUGIN_COMMAND_PREFIX:expose lolipop ${PLUGIN_DATASTORE_PORTS[@]}
|
#E dokku $PLUGIN_COMMAND_PREFIX:expose lolipop ${PLUGIN_DATASTORE_PORTS[@]}
|
||||||
|
#E expose the service on the service's normal ports, with the first on a specified ip adddress (127.0.0.1)
|
||||||
|
#E dokku $PLUGIN_COMMAND_PREFIX:expose lolipop 127.0.0.1:${PLUGIN_DATASTORE_PORTS[@]}
|
||||||
#A service, service to run command against
|
#A service, service to run command against
|
||||||
#A ports, a list of ports to run against
|
#A ports, a list of ports to run against
|
||||||
declare desc="expose a $PLUGIN_SERVICE service on custom port if provided (random port otherwise)"
|
declare desc="expose a $PLUGIN_SERVICE service on custom host:port if provided (random port on the 0.0.0.0 interface if otherwise unspecified)"
|
||||||
local cmd="$PLUGIN_COMMAND_PREFIX:expose" argv=("$@")
|
local cmd="$PLUGIN_COMMAND_PREFIX:expose" argv=("$@")
|
||||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||||
declare SERVICE="$1" PORTS_LIST=("${@:2}")
|
declare SERVICE="$1" PORTS_LIST=("${@:2}")
|
||||||
|
|||||||
Reference in New Issue
Block a user