Properly remap http port 80 mappings to https 443 when adding an ssl certificate

Rather than removing all port mappings, we simply remap port 80 mappings to 443. The previous behavior would remove custom port mappings for all applications and reset them on any certificate change, preventing automation from plugins such as letsencrypt. While this behavior doesn't matter for buildpack deploys - which only expose a single port on container port 5000 - Dockerfile deploys would frequently be affected by such a change, requiring a remapping of all custom ports.

This commit also standardizes on the method used to source the proxy functions
This commit is contained in:
Jose Diaz-Gonzalez
2016-07-15 02:51:31 -04:00
parent c93396aff9
commit 0d4560177a
9 changed files with 77 additions and 39 deletions

View File

@@ -524,7 +524,7 @@ dokku_deploy_cmd() {
local cmd="deploy"
source "$PLUGIN_AVAILABLE_PATH/checks/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_CORE_AVAILABLE_PATH/proxy/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
[[ -z $1 ]] && dokku_log_fail "Please specify an app to deploy"
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")