mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-25 11:21:02 +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:
|
services:
|
||||||
woodpecker-server:
|
woodpecker-server:
|
||||||
build:
|
image: woodpeckerci/woodpecker-server:latest
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
image: woodpeckerci/woodpecker-server:local
|
|
||||||
ports:
|
ports:
|
||||||
- 8000:8000
|
- 8000:8000
|
||||||
|
networks:
|
||||||
|
- woodpecker
|
||||||
volumes:
|
volumes:
|
||||||
- /var/lib/woodpecker:/var/lib/woodpecker/
|
- /var/lib/woodpecker:/var/lib/woodpecker/
|
||||||
environment:
|
environment:
|
||||||
|
@ -19,13 +18,18 @@ services:
|
||||||
- WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
|
- WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
|
||||||
- WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
|
- WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
|
||||||
woodpecker-agent:
|
woodpecker-agent:
|
||||||
build:
|
depends_on:
|
||||||
context: .
|
woodpecker-server:
|
||||||
dockerfile: Dockerfile.agent
|
condition: service_healthy
|
||||||
image: woodpeckerci/woodpecker-agent:local
|
image: woodpeckerci/woodpecker-agent:latest
|
||||||
|
networks:
|
||||||
|
- woodpecker
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
environment:
|
environment:
|
||||||
- WOODPECKER_SERVER=woodpecker-server:9000
|
- WOODPECKER_SERVER=woodpecker-server:9000
|
||||||
- WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
|
- WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
|
||||||
- WOODPECKER_MAX_WORKFLOWS=2
|
- 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
|
## 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.
|
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