Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs about Gitea on same host and update docker-compose example #2752

Merged
merged 14 commits into from
Nov 11, 2023
Merged
16 changes: 10 additions & 6 deletions docker-compose.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ version: '3'

services:
woodpecker-server:
build:
context: .
dockerfile: Dockerfile
image: woodpeckerci/woodpecker-server:local
qwerty287 marked this conversation as resolved.
Show resolved Hide resolved
ports:
- 8000:8000
networks:
- woodpecker
volumes:
- /var/lib/woodpecker:/var/lib/woodpecker/
environment:
Expand All @@ -19,13 +18,18 @@ services:
- WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
woodpecker-agent:
build:
context: .
dockerfile: Dockerfile.agent
depends_on:
woodpecker-server:
condition: service_healthy
image: woodpeckerci/woodpecker-agent:local
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:
18 changes: 18 additions & 0 deletions docs/docs/30-administration/11-forges/30-gitea.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@ 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 try to clone by the clone URL Gitea reports via API. So you might want to specify a docker network for the agent too:
qwerty287 marked this conversation as resolved.
Show resolved Hide resolved

```diff
# docker-compose.yml
version: '3'

services:
[...]
woodpecker-agent:
[...]
environment:
- [...]
+ - WOODPECKER_BACKEND_DOCKER_NETWORK=gitea
qwerty287 marked this conversation as resolved.
Show resolved Hide resolved
```

## 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.
Expand Down