Deploy on Railway
Railway is a good fit for ZAR: it provisions Postgres and Redis, injects their connection strings, and gives you a public HTTPS domain for the webhook. The repo includesrailway.toml, nixpacks.toml, and a start.py entrypoint that reads Railway’s $PORT.
1. Create the service
- Create a new Railway project from your copy of the ZAR source (it includes
railway.toml,nixpacks.toml, andstart.py). - Railway detects the Dockerfile / Nixpacks build and starts a web service.
2. Add Postgres and Redis
Add the PostgreSQL and Redis plugins to the project. Railway injects:DATABASE_URL(apostgres://…URL) — ZAR uses the async Postgres driver.REDIS_URL.
3. Set environment variables
In the service Variables, set at least:GITHUB_PRIVATE_KEY (the inline PEM) over GITHUB_PRIVATE_KEY_PATH — there’s no .pem file to mount. See Environment variables for the rest (limits, OAuth, SMTP, billing).
4. Deploy and get the domain
Deploy. Once it’s live, open the service Settings → Networking and generate a public domain (e.g.https://your-app.up.railway.app).
5. Point GitHub at the webhook
Set your GitHub App’s Webhook URL to:/github prefix.)
6. Verify
- Health check:
GET https://your-app.up.railway.app/healthz→{"ok": true}. - Railway’s healthcheck should pass against
/healthz. - Install the App on a repo and open a test PR, or use the dashboard’s Send test webhook.
Notes
- The start command resolves to
uvicorn app.main:appbound to Railway’s$PORT. - Use Postgres (auto-injected) rather than SQLite for anything beyond a quick trial.
- If you change the domain later, update the GitHub App’s Webhook URL to match.
Next steps
- Environment variables — full configuration.
- Docker — if you’d rather run containers elsewhere.
- Troubleshooting — webhook delivery problems.