fix: address CI failures from env var migration
- Add apps:set subcommand for managing apps properties (mirrors ps:set, scheduler:set, builder:set pattern) - Update nginx-vhosts functions/pre-disable-vhost/pre-enable-vhost to read proxy port from properties instead of config vars - Fix test commands to use correct property-setting approaches: prop binary for ports properties, apps:set for apps properties
This commit is contained in:
@@ -227,8 +227,8 @@ nginx_build_config() {
|
||||
|
||||
# setup nginx listen ports
|
||||
plugn trigger ports-configure "$APP"
|
||||
local PROXY_PORT=$(config_get "$APP" DOKKU_PROXY_PORT)
|
||||
local PROXY_SSL_PORT=$(config_get "$APP" DOKKU_PROXY_SSL_PORT)
|
||||
local PROXY_PORT=$(plugn trigger ports-get-property "$APP" "proxy-port")
|
||||
local PROXY_SSL_PORT=$(plugn trigger ports-get-property "$APP" "proxy-ssl-port")
|
||||
|
||||
local PORT_MAP PROXY_PORT_MAP proxy_port_map
|
||||
while read -r PORT_MAP; do
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
|
||||
trigger-nginx-vhosts-pre-disable-vhost() {
|
||||
declare desc="unset port prior to vhosts being disabled"
|
||||
@@ -14,19 +14,14 @@ trigger-nginx-vhosts-pre-disable-vhost() {
|
||||
fi
|
||||
|
||||
# only clear ports if they are port 80 or 443
|
||||
local PROXY_PORT=$(config_get "$APP" DOKKU_PROXY_PORT)
|
||||
local PROXY_SSL_PORT=$(config_get "$APP" DOKKU_PROXY_SSL_PORT)
|
||||
local PROXY_PORT=$(plugn trigger ports-get-property "$APP" "proxy-port")
|
||||
local PROXY_SSL_PORT=$(plugn trigger ports-get-property "$APP" "proxy-ssl-port")
|
||||
|
||||
ports_to_clear=()
|
||||
if [[ "$PROXY_PORT" == "80" ]]; then
|
||||
ports_to_clear+=("DOKKU_PROXY_PORT")
|
||||
fn-plugin-property-delete "ports" "$APP" "proxy-port"
|
||||
fi
|
||||
if [[ "$PROXY_SSL_PORT" == "443" ]]; then
|
||||
ports_to_clear+=("DOKKU_PROXY_SSL_PORT")
|
||||
fi
|
||||
|
||||
if [[ "${#ports_to_clear[@]}" -gt 0 ]]; then
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" "${ports_to_clear[@]}"
|
||||
fn-plugin-property-delete "ports" "$APP" "proxy-ssl-port"
|
||||
fi
|
||||
|
||||
# clear ports if there is a mapping starting with http:80 or https:443
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
|
||||
trigger-nginx-vhosts-pre-enable-vhost() {
|
||||
declare desc="unset port prior to vhosts being enabled"
|
||||
@@ -14,19 +14,14 @@ trigger-nginx-vhosts-pre-enable-vhost() {
|
||||
fi
|
||||
|
||||
# only clear ports if they are port 80 or 443
|
||||
local PROXY_PORT=$(config_get "$APP" DOKKU_PROXY_PORT)
|
||||
local PROXY_SSL_PORT=$(config_get "$APP" DOKKU_PROXY_SSL_PORT)
|
||||
local PROXY_PORT=$(plugn trigger ports-get-property "$APP" "proxy-port")
|
||||
local PROXY_SSL_PORT=$(plugn trigger ports-get-property "$APP" "proxy-ssl-port")
|
||||
|
||||
ports_to_clear=()
|
||||
if [[ "$PROXY_PORT" == "80" ]]; then
|
||||
ports_to_clear+=("DOKKU_PROXY_PORT")
|
||||
fn-plugin-property-delete "ports" "$APP" "proxy-port"
|
||||
fi
|
||||
if [[ "$PROXY_SSL_PORT" == "443" ]]; then
|
||||
ports_to_clear+=("DOKKU_PROXY_SSL_PORT")
|
||||
fi
|
||||
|
||||
if [[ "${#ports_to_clear[@]}" -gt 0 ]]; then
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" "${ports_to_clear[@]}"
|
||||
fn-plugin-property-delete "ports" "$APP" "proxy-ssl-port"
|
||||
fi
|
||||
|
||||
# clear ports if there is a mapping starting with http:80 or https:443
|
||||
|
||||
Reference in New Issue
Block a user