Merge pull request #3562 from dokku/3550-proxy-ports-update

Proxy ports manipulation updates
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2019-05-19 22:58:55 -07:00
commit a475af1974
4 files changed
+14 -13

No files matched your search

+5 -5
View File
@@ -3,11 +3,11 @@
> New as of 0.5.0, Enhanced in 0.6.0 > New as of 0.5.0, Enhanced in 0.6.0
``` ```
proxy:ports <app> # List proxy port mappings for app proxy:ports <app> # List proxy port mappings for an app
proxy:ports-set <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Set proxy port mappings for app proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Add proxy port mappings to an app
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Add proxy port mappings for app proxy:ports-clear <app> # Clear all proxy port mappings for an app
proxy:ports-clear <app> # Clear all proxy port mappings for app proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] # Remove specific proxy port mappings from an app
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] # Unset proxy port mappings for app proxy:ports-set <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Set proxy port mappings for an app
``` ```
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx. In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
+5 -4
View File
@@ -80,12 +80,13 @@ proxy_help_content_func() {
declare desc="return proxy plugin help content" declare desc="return proxy plugin help content"
cat <<help_content cat <<help_content
proxy <app>, [DEPRECATED] Show proxy settings for app proxy <app>, [DEPRECATED] Show proxy settings for app
proxy:enable <app>, Enable proxy for app
proxy:disable <app>, Disable proxy for app proxy:disable <app>, Disable proxy for app
proxy:enable <app>, Enable proxy for app
proxy:ports <app>, List proxy port mappings for app proxy:ports <app>, List proxy port mappings for app
proxy:ports-clear <app>, Clear all proxy port mappings for app proxy:ports-add <app> [<scheme>:<host-port>:<container-port>...], Add proxy port mappings to an app
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...], Set proxy port mappings for app proxy:ports-clear <app>, Clear all proxy port mappings for an app
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...], Unset proxy port mappings for app proxy:ports-remove <app> [<host-port>|<scheme>:<host-port>:<container-port>...], Remove specific proxy port mappings from an app
proxy:ports-set <app> [<scheme>:<host-port>:<container-port>...], Set proxy port mappings for an app
proxy:report [<app>] [<flag>], Displays a proxy report for one or more apps proxy:report [<app>] [<flag>], Displays a proxy report for one or more apps
proxy:set <app> <proxy-type>, Set proxy type for app proxy:set <app> <proxy-type>, Set proxy type for app
help_content help_content
+1 -1
View File
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions" source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
proxy_ports_add_cmd() { proxy_ports_add_cmd() {
declare desc="add proxy port mappings from an app" declare desc="add proxy port mappings to an app"
local cmd="proxy:add" local cmd="proxy:add"
local APP="$2" local APP="$2"
verify_app_name "$APP" verify_app_name "$APP"
+3 -3
View File
@@ -5,14 +5,14 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions" source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
proxy_ports_set_cmd() { proxy_ports_set_cmd() {
declare desc="add proxy port mappings from an app" declare desc="set proxy port mappings for an app"
local cmd="proxy:add" local cmd="proxy:set"
local APP="$2" local APP="$2"
verify_app_name "$APP" verify_app_name "$APP"
shift 2 shift 2
set_proxy_ports "$APP" "$@" set_proxy_ports "$APP" "$@"
plugn trigger post-proxy-ports-update "$APP" "add" plugn trigger post-proxy-ports-update "$APP" "set"
} }
proxy_ports_set_cmd "$@" proxy_ports_set_cmd "$@"