Files
2026-02-23 17:11:02 -08:00

67 lines
1.6 KiB
Markdown

# PaaS Deployment (Fly.io / Railway / Render)
Flynn can run on common PaaS platforms using the repo `Dockerfile`.
Key requirements:
- Bind on all interfaces: set `server.localhost: false`.
- Use the platform port: Flynn supports `PORT` env override (it overrides `server.port`).
This repo includes a PaaS-friendly config profile at `config/profiles/paas.overlay.yaml`.
`config/paas.yaml` is generated from:
- `config/default.yaml` (canonical base)
- `config/profiles/paas.overlay.yaml` (PaaS overrides only)
Regenerate/check with:
```bash
pnpm config:profiles:generate
pnpm config:profiles:check
```
## Fly.io
Template: `deploy/flyio/fly.toml`
```bash
# Create app
fly apps create
# Create persistent data volume (sessions + memory)
fly volumes create flynn_data --size 1
# Set required secrets
fly secrets set ANTHROPIC_API_KEY=sk-ant-...
# Deploy
fly deploy -c deploy/flyio/fly.toml
```
Notes:
- The Docker image ships a default config at `/config/config.yaml` (from `config/paas.yaml`).
- If you want to supply your own config, set `FLYNN_CONFIG` to your path or mount a file at `/config/config.yaml`.
## Railway
Railway can deploy directly from this repo using the `Dockerfile`.
Checklist:
- Add env var `ANTHROPIC_API_KEY`.
- Ensure your config binds externally (`server.localhost: false`) or use the baked-in `config/paas.yaml`.
Optional template: `deploy/railway/railway.toml`
## Render
Render can deploy directly from this repo using the `Dockerfile`.
Checklist:
- Add env var `ANTHROPIC_API_KEY`.
- Ensure your config binds externally (`server.localhost: false`) or use the baked-in `config/paas.yaml`.
Optional blueprint: `deploy/render/render.yaml`