feat(deploy): add PaaS templates and config

This commit is contained in:
William Valentin
2026-02-15 18:28:26 -08:00
parent 2177413833
commit 8d0016fd32
10 changed files with 205 additions and 3 deletions
+56
View File
@@ -0,0 +1,56 @@
# 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 template at `config/paas.yaml`.
## 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`
+5
View File
@@ -7,6 +7,7 @@ This guide covers deploying Flynn in a production environment.
- [Prerequisites](#prerequisites)
- [Docker Deployment](#docker-deployment)
- [Nix Deployment](#nix-deployment)
- [PaaS Deployment](#paas-deployment)
- [Systemd Service](#systemd-service)
- [Security](#security)
- [Configuration](#configuration)
@@ -101,6 +102,10 @@ export OPENAI_API_KEY=sk-...
If you use Nix, this repo ships a flake (package + dev shell + optional NixOS
module). See `docs/deployment/NIX.md`.
## PaaS Deployment
Templates and notes for Fly.io / Railway / Render are in `docs/deployment/PAAS.md`.
## Systemd Service
### Service File