fix: always set a default ssl port for apps with ssl enabled

Closes #2535
This commit is contained in:
Jose Diaz-Gonzalez committed 2017-01-30 03:04:02 -05:00
1 parent 99378af668
commit aae7401888
1 file changed
+5 -6
+5 -6
View File
@@ -100,14 +100,13 @@ configure_nginx_ports() {
config_set --no-restart "$APP" DOKKU_NGINX_PORT="$NGINX_PORT" config_set --no-restart "$APP" DOKKU_NGINX_PORT="$NGINX_PORT"
fi fi
if [[ -z "$DOKKU_NGINX_SSL_PORT" ]]; then if [[ -z "$DOKKU_NGINX_SSL_PORT" ]]; then
if (is_ssl_enabled "$APP") && [[ -z "$RAW_TCP_PORTS" ]]; then if (is_ssl_enabled "$APP")
if [[ "$IS_APP_VHOST_ENABLED" == "false" ]]; then local NGINX_SSL_PORT=443
if [[ -z "$RAW_TCP_PORTS" ]] && [[ "$IS_APP_VHOST_ENABLED" == "false" ]]; then
dokku_log_info1 "no nginx ssl port set. setting to random open high port" dokku_log_info1 "no nginx ssl port set. setting to random open high port"
local NGINX_SSL_PORT=$(get_available_port) NGINX_SSL_PORT=$(get_available_port)
else
local NGINX_SSL_PORT=443
fi fi
config_set --no-restart "$APP" DOKKU_NGINX_SSL_PORT="$NGINX_SSL_PORT" config_set --no-restart "$APP" DOKKU_NGINX_SSL_PORT="$NGINX_SSL_PORT"
fi fi
fi fi
if [[ -z "$DOKKU_PROXY_PORT_MAP" ]]; then if [[ -z "$DOKKU_PROXY_PORT_MAP" ]]; then