feat: route paths to non-web processes via proxy:route

Adds proxy:route:set/remove/clear/report so users can declare path-prefix routes to non-web Procfile processes without hand-writing nginx.conf.sigil. Routes are stored on the proxy plugin as a PropertyMap of path to process:port:strip, with set semantics so each invocation produces a fully-determined state and re-application is idempotent. A proxy-supports-routes capability trigger gates the command per backend - nginx-vhosts, traefik-vhosts, caddy-vhosts, and scheduler-k3s render routes today; openresty-vhosts and haproxy-vhosts refuse until their sidecar images learn a path-prefix vocabulary (tracked in dokku/openresty-docker-proxy#137 and the haproxy sidecar). Closes #8725.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-11-04 14:56:38 -05:00
1 parent 2cd558e102
commit ffd5248cc3
29 files changed
+1539 -7

No files matched your search

+18
View File
@@ -64,6 +64,24 @@ func TriggerProxyType(appName string) error {
return nil
}
// TriggerProxyRoutesList prints one "process|port|path|strip" line per route,
// sorted by descending path length. Backends use this to render path-based
// routes in their config or labels.
func TriggerProxyRoutesList(appName string) error {
routes, err := GetRoutes(appName)
if err != nil {
return err
}
for _, r := range routes {
strip := "0"
if r.StripPrefix {
strip = "1"
}
fmt.Printf("%s|%d|%s|%s\n", r.Process, r.Port, r.Path, strip)
}
return nil
}
// TriggerPostAppCloneSetup creates new proxy files
func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error {
return common.PropertyClone("proxy", oldAppName, newAppName)