Run PR-Agent as a pinned webhook server on the Gitea Docker network and review on PR open plus slash commands. The per-PR opencode installer and verdict-posting step are removed. The server-side .env stays outside the repository; deploy/pr-agent/ holds the compose definition and operator notes.
PR-Agent for Gitea
PR-Agent runs as a webhook server next to Gitea on server0. Gitea sends
pull-request and comment events over the gitea_gitea Docker network; the
endpoint is not published to the internet.
| Piece | Value |
|---|---|
| Image | pragent/pr-agent:0.49.0-gitea_app |
| Container | pr-agent |
| Webhook URL, from Gitea | http://pr-agent:3000/api/v1/gitea_webhooks |
| Config | /home/noel/self-hosted/pr-agent/.env (mode 600) |
| Logs | docker logs -f pr-agent |
| Upgrade | bump the image tag, then docker compose up -d in this directory |
Gitea side
- The bot user
pr-agentis a collaborator onCV_Website/CV_Site_Nuxtwith write permission. Its personal access token is scoped toread:repository,write:issueandread:user. - The repository webhook sends
push,issues,pull_requestandissue_commentevents, with JSON content type and the shared secret. - Gitea's
[webhook] ALLOWED_HOST_LISTincludesprivate:3000. Without it, Gitea's default egress policy refuses webhook deliveries to private addresses, including the Docker network.
AI model
The agent uses OpenCode Go's OpenAI-compatible endpoint:
model openai/glm-5.3-flash
fallback openai/glm-5.3
api base https://opencode.ai/inference/go/openai/v1
CONFIG__CUSTOM_MODEL_MAX_TOKENS tells PR-Agent the context limit, because
the model is not in its token table. The effective review budget is still
capped by PR-Agent's default config.max_model_tokens of 32000.
First check
Open a pull request in CV_Website/CV_Site_Nuxt. The server runs /describe
and /review on open/reopen; comment commands such as /review, /improve
and /ask are handled from the PR conversation. If nothing appears:
docker compose logs --tail=100 pr-agent
A 403 in the Gitea webhook delivery log means the secret does not match or
ALLOWED_HOST_LIST is still missing; a 401 from PR-Agent means the
signature header and secret disagree.