mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-28 21:01:08 +00:00
Add docs about Gitea on same host and update docker-compose example (#2752)
Closes #1660 Taken out the part of it that's still up-to-date. Everything else in this PR is outdated as we don't primarily use quay.io --------- Co-authored-by: Anbraten <anton@ju60.de> Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
This commit is contained in:
parent
e6b3b94241
commit
f2ed2e7b48
2 changed files with 33 additions and 8 deletions
|
@ -2,12 +2,11 @@ version: '3'
|
|||
|
||||
services:
|
||||
woodpecker-server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: woodpeckerci/woodpecker-server:local
|
||||
image: woodpeckerci/woodpecker-server:latest
|
||||
ports:
|
||||
- 8000:8000
|
||||
networks:
|
||||
- woodpecker
|
||||
volumes:
|
||||
- /var/lib/woodpecker:/var/lib/woodpecker/
|
||||
environment:
|
||||
|
@ -19,13 +18,18 @@ services:
|
|||
- WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
|
||||
- WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
|
||||
woodpecker-agent:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.agent
|
||||
image: woodpeckerci/woodpecker-agent:local
|
||||
depends_on:
|
||||
woodpecker-server:
|
||||
condition: service_healthy
|
||||
image: woodpeckerci/woodpecker-agent:latest
|
||||
networks:
|
||||
- woodpecker
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- WOODPECKER_SERVER=woodpecker-server:9000
|
||||
- WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
|
||||
- WOODPECKER_MAX_WORKFLOWS=2
|
||||
|
||||
networks:
|
||||
woodpecker:
|
||||
|
|
|
@ -20,6 +20,27 @@ services:
|
|||
[...]
|
||||
```
|
||||
|
||||
## Gitea on the same host
|
||||
|
||||
If you have Gitea also running on the same host within a container, make sure the agent does have access to it.
|
||||
The agent tries to clone using the URL which Gitea reports through its API. For simplified connectivity, you should add the woodpecker agent to the same docker network as Gitea is in.
|
||||
Otherwise, the communication should go via the `docker0` gateway (usually 172.17.0.1).
|
||||
|
||||
To configure the Docker network if the network's name is `gitea`, configure it like this:
|
||||
|
||||
```diff
|
||||
# docker-compose.yml
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
[...]
|
||||
woodpecker-agent:
|
||||
[...]
|
||||
environment:
|
||||
- [...]
|
||||
+ - WOODPECKER_BACKEND_DOCKER_NETWORK=gitea
|
||||
```
|
||||
|
||||
## Registration
|
||||
|
||||
Register your application with Gitea to create your client id and secret. You can find the OAuth applications settings of Gitea at `https://gitea.<host>/user/settings/`. It is very import the authorization callback URL matches your http(s) scheme and hostname exactly with `https://<host>/authorize` as the path.
|
||||
|
|
Loading…
Reference in a new issue