diff --git a/cmd/server/flags.go b/cmd/server/flags.go index e81b30c6e..7d09a6900 100644 --- a/cmd/server/flags.go +++ b/cmd/server/flags.go @@ -45,11 +45,6 @@ var flags = append([]cli.Flag{ Name: "server-webhook-host", Usage: "server fully qualified url for forge's Webhooks (://[/])", }, - &cli.StringFlag{ - EnvVars: []string{"WOODPECKER_ROOT_PATH", "WOODPECKER_ROOT_URL"}, - Name: "root-path", - Usage: "server url root (used for statics loading when having a url path prefix)", - }, &cli.StringFlag{ EnvVars: []string{"WOODPECKER_SERVER_ADDR"}, Name: "server-addr", diff --git a/cmd/server/server.go b/cmd/server/server.go index b95449fdd..37723c5b4 100644 --- a/cmd/server/server.go +++ b/cmd/server/server.go @@ -347,13 +347,8 @@ func setupEvilGlobals(c *cli.Context, v store.Store, f forge.Forge) { server.Config.Server.StatusContext = c.String("status-context") server.Config.Server.StatusContextFormat = c.String("status-context-format") server.Config.Server.SessionExpires = c.Duration("session-expires") - rootPath := c.String("root-path") - if !c.IsSet("root-path") { - // Extract RootPath from Host... - u, _ := url.Parse(server.Config.Server.Host) - rootPath = u.Path - } - rootPath = strings.TrimSuffix(rootPath, "/") + u, _ := url.Parse(server.Config.Server.Host) + rootPath := strings.TrimSuffix(u.Path, "/") if rootPath != "" && !strings.HasPrefix(rootPath, "/") { rootPath = "/" + rootPath } diff --git a/docs/docs/30-administration/00-deployment/00-overview.md b/docs/docs/30-administration/00-deployment/00-overview.md index c1d4f6466..8400ae8cc 100644 --- a/docs/docs/30-administration/00-deployment/00-overview.md +++ b/docs/docs/30-administration/00-deployment/00-overview.md @@ -3,10 +3,10 @@ A Woodpecker deployment consists of two parts: - A server which is the heart of Woodpecker and ships the web interface. -- Next to one server you can deploy any number of agents which will run the pipelines. +- Next to one server, you can deploy any number of agents which will run the pipelines. Each agent is able to process one pipeline step by default. -If you have 4 agents installed and connected to the Woodpecker server, your system will process 4 workflows in parallel. +If you have four agents installed and connected to the Woodpecker server, your system will process four workflows in parallel. :::tip You can add more agents to increase the number of parallel workflows or set the agent's `WOODPECKER_MAX_WORKFLOWS=1` environment variable to increase the number of parallel workflows for that agent. @@ -61,7 +61,7 @@ A [Prometheus endpoint](../90-prometheus.md) is exposed. See the [proxy guide](../70-proxy.md) if you want to see a setup behind Apache, Nginx, Caddy or ngrok. -In the case you need to use Woodpecker with a URL path prefix (like: ), you can use the option [`WOODPECKER_ROOT_PATH`](../10-server-config.md#woodpecker_root_path). +In the case you need to use Woodpecker with a URL path prefix (like: ), add the root path to [`WOODPECKER_HOST`](../10-server-config.md#woodpecker_host). ## Third-party installation methods diff --git a/docs/docs/30-administration/10-server-config.md b/docs/docs/30-administration/10-server-config.md index bbc5ffa4b..65b192dd0 100644 --- a/docs/docs/30-administration/10-server-config.md +++ b/docs/docs/30-administration/10-server-config.md @@ -573,14 +573,6 @@ Specify a configuration service endpoint, see [Configuration Extension](./100-ex Specify how many seconds before timeout when fetching the Woodpecker configuration from a Forge -### `WOODPECKER_ROOT_PATH` - -> Default: extracted from `WOODPECKER_HOST` - -Server URL path prefix (used for statics loading when having a url path prefix), should start with `/` - -Example: `WOODPECKER_ROOT_PATH=/woodpecker` - ### `WOODPECKER_ENABLE_SWAGGER` > Default: true diff --git a/docs/docs/91-migrations.md b/docs/docs/91-migrations.md index 20e933098..f80f8353e 100644 --- a/docs/docs/91-migrations.md +++ b/docs/docs/91-migrations.md @@ -4,7 +4,7 @@ Some versions need some changes to the server configuration or the pipeline conf ## `next` -No breaking changes yet +- Removed `WOODPECKER_ROOT_PATH` and `WOODPECKER_ROOT_URL` config variables. Use `WOODPECKER_HOST` with a path instead ## 2.0.0 diff --git a/server/config.go b/server/config.go index abb1badc2..e1483739a 100644 --- a/server/config.go +++ b/server/config.go @@ -71,9 +71,6 @@ var Config = struct { CustomCSSFile string CustomJsFile string EnableSwagger bool - // Open bool - // Orgs map[string]struct{} - // Admins map[string]struct{} } Prometheus struct { AuthToken string