Deployment¶
Fly.io¶
prbot is pre-configured for Fly.io with a persistent SQLite volume.
1. Install flyctl¶
2. Create the app¶
3. Create a volume for the database¶
Note
Replace lhr with your preferred Fly.io region.
4. Set secrets¶
fly secrets set \
PR_BOT_GITHUB_APP_ID="your-app-id" \
PR_BOT_GITHUB_PRIVATE_KEY="$(cat path/to/private-key.pem)" \
PR_BOT_GITHUB_WEBHOOK_SECRET="your-webhook-secret" \
PR_BOT_SLACK__BOT_TOKEN="xoxb-your-token" \
PR_BOT_SLACK__SIGNING_SECRET="your-signing-secret" \
PR_BOT_DISCORD__BOT_TOKEN="your-discord-bot-token"
5. Deploy¶
The app will be available at https://your-app-name.fly.dev.
CI/CD¶
The included GitHub Actions workflow (.github/workflows/ci.yml) automatically deploys to Fly.io on pushes to main after all checks pass. Set the FLY_API_TOKEN secret in your GitHub repository settings.
Docker¶
Build and run with Docker directly:
docker build -t prbot .
docker run -p 8080:8080 \
-v $(pwd)/data:/app/data \
--env-file .env \
prbot
Dockerfile
Self-hosting checklist¶
Before going to production, make sure you have:
- [x] Created and installed a GitHub App
- [x] Set up at least one messaging integration:
- [x] Set all required environment variables
- [x] Configured your webhook URLs to point to your deployment:
- Slack:
https://your-domain.com/slack/events - GitHub:
https://your-domain.com/github/webhooks
- Slack:
- [x] Ensured the database volume is persistent (data is not lost on redeploy)
- [x] Verified the
/healthendpoint returns{"status": "healthy"}
Discord doesn't need a webhook URL
The Discord integration connects via WebSocket, so no public URL configuration is needed — just the bot token.