fix: move proxy-port properties to proxy plugin and fix CI failures
- Move proxy-port and proxy-ssl-port properties from ports plugin to proxy plugin where they conceptually belong - Generalize proxy:set to handle any property (matching ps:set pattern) instead of only handling the type property - Fix apps:set --global flag parsing (pflag treats --global as a flag, not an argument — must be defined explicitly like ps:set does) - Add missing property-functions source to scheduler-docker-local shell scripts (scheduler-enter, scheduler-run, scheduler-deploy, check-deploy, bin/scheduler-deploy-process-container) - Update nginx-vhosts property references from ports to proxy plugin - Update tests to use proxy:set for proxy-port properties
This commit is contained in:
19 files changed
+57
-69
No files matched your search
@@ -21,16 +21,6 @@ func TriggerInstall() error {
|
||||
ListProperty: true,
|
||||
Transform: transformPortMap,
|
||||
},
|
||||
{
|
||||
ConfigVar: "DOKKU_PROXY_PORT",
|
||||
GlobalConfigVar: "DOKKU_PROXY_PORT",
|
||||
Property: "proxy-port",
|
||||
},
|
||||
{
|
||||
ConfigVar: "DOKKU_PROXY_SSL_PORT",
|
||||
GlobalConfigVar: "DOKKU_PROXY_SSL_PORT",
|
||||
Property: "proxy-ssl-port",
|
||||
},
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -166,7 +156,7 @@ func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error {
|
||||
|
||||
// TriggerPostCertsRemove unsets port properties after SSL cert is removed
|
||||
func TriggerPostCertsRemove(appName string) error {
|
||||
if err := common.PropertyDelete("ports", appName, "proxy-ssl-port"); err != nil {
|
||||
if err := common.PropertyDelete("proxy", appName, "proxy-ssl-port"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -175,15 +165,15 @@ func TriggerPostCertsRemove(appName string) error {
|
||||
|
||||
// TriggerPostCertsUpdate sets port properties after SSL cert is added
|
||||
func TriggerPostCertsUpdate(appName string) error {
|
||||
port := common.PropertyGet("ports", appName, "proxy-port")
|
||||
sslPort := common.PropertyGet("ports", appName, "proxy-ssl-port")
|
||||
port := common.PropertyGet("proxy", appName, "proxy-port")
|
||||
sslPort := common.PropertyGet("proxy", appName, "proxy-ssl-port")
|
||||
portMaps := getPortMaps(appName)
|
||||
|
||||
if port == "80" {
|
||||
common.PropertyDelete("ports", appName, "proxy-port")
|
||||
common.PropertyDelete("proxy", appName, "proxy-port")
|
||||
}
|
||||
if sslPort == "443" {
|
||||
common.PropertyDelete("ports", appName, "proxy-ssl-port")
|
||||
common.PropertyDelete("proxy", appName, "proxy-ssl-port")
|
||||
}
|
||||
|
||||
var http80Ports []PortMap
|
||||
|
||||
Reference in new issue
Block a user