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

Docs: Update docker-compose example and add hint for gitea #1660

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 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
image: quay.io/woodpeckerci/woodpecker-server:next
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we already push images to quay.io from CI?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well we have images there that get synced from docker atm ... I prepare a config to push to different registry's soon ...

ports:
- 8000:8000
networks:
- woodpecker
volumes:
- /var/lib/woodpecker:/var/lib/woodpecker/
environment:
Expand All @@ -18,14 +17,20 @@ services:
- WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- 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: quay.io/woodpeckerci/woodpecker-agent:next
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:

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