Update Administration Setup Docs (#1293)

Add clarification of port difference for gRPC and HTTP

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Brandon Kauffman 2022-10-19 21:33:18 -04:00 committed by GitHub
parent c48b1dcd7e
commit 34d7dadb14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 3 deletions

View file

@ -72,8 +72,36 @@ services:
environment: environment:
- [...] - [...]
+ - WOODPECKER_HOST=${WOODPECKER_HOST} + - WOODPECKER_HOST=${WOODPECKER_HOST}
+ - WOODPECKER_HOST=${WOODPECKER_HOST}
```
Woodpecker can also have its port's configured. It uses a separate port for gRPC and for HTTP. The agent performs gRPC calls and connects to the gRPC port.
They can be configured with ADDR variables:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
[...]
environment:
- [...]
+ - WOODPECKER_GRPC_ADDR=${WOODPECKER_GRPC_ADDR}
+ - WOODPECKER_SERVER_ADDR=${WOODPECKER_HTTP_ADDR}
``` ```
Reverse proxying can also be [configured for gRPC](./proxy#caddy). If the agents are connecting over the internet, it should also be SSL encrypted. The agent then needs to be configured to be secure:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
[...]
environment:
- [...]
+ - WOODPECKER_GRPC_SECURE=true # defaults to false
+ - WOODPECKER_GRPC_VERIFY=true # default
```
As agents run pipeline steps as docker containers they require access to the host machine's Docker daemon: As agents run pipeline steps as docker containers they require access to the host machine's Docker daemon:
```diff ```diff
@ -88,8 +116,7 @@ services:
+ - /var/run/docker.sock:/var/run/docker.sock + - /var/run/docker.sock:/var/run/docker.sock
``` ```
Agents require the server address for agent-to-server communication: Agents require the server address for agent-to-server communication. The agent connects to the server's gRPC port:
```diff ```diff
# docker-compose.yml # docker-compose.yml
version: '3' version: '3'

View file

@ -82,11 +82,13 @@ server {
This guide provides a brief overview for installing Woodpecker server behind the [Caddy web-server](https://caddyserver.com/). This is an example caddyfile proxy configuration: This guide provides a brief overview for installing Woodpecker server behind the [Caddy web-server](https://caddyserver.com/). This is an example caddyfile proxy configuration:
```nohighlight ```caddy
# expose WebUI and API
woodpecker.example.com { woodpecker.example.com {
reverse_proxy woodpecker-server:8000 reverse_proxy woodpecker-server:8000
} }
# expose gRPC
woodpeckeragent.example.com { woodpeckeragent.example.com {
reverse_proxy h2c://woodpecker-server:9000 reverse_proxy h2c://woodpecker-server:9000
} }