Install
Fly.io
deploy/fly/fly.toml
is a worked example. Nothing in the project depends on Fly.io; any host
that runs a container works. Replace the app name and public URL with your
own. SQLite on a Fly volume supports a single machine; for several
machines, set POSTKEEP_DATABASE_URL to a PostgreSQL database instead.
fly apps create my-postkeep
fly volumes create postkeep_data --size 1 --region sin
fly secrets set POSTKEEP_MASTER_KEY="$(docker run --rm postkeep/postkeep generate-key)"
fly deploy --config deploy/fly/fly.tomlThe example file sets:
app = "my-postkeep"andprimary_region = "sin".image = "postkeep/postkeep:latest".- A volume
postkeep_datamounted at/data. Upgrading from 0.2.x: see the database note under Persistent storage in the deployment overview. POSTKEEP_PUBLIC_URL = "https://my-postkeep.fly.dev".POSTKEEP_CLIENT_IP_HEADER = "Fly-Client-IP"(Fly’s proxy puts the real client address in this header).auto_stop_machines = "stop",auto_start_machines = true,min_machines_running = 0.- A health check:
GET /healthz.
New-mail webhooks
Webhook watchers only run while the server does. If anyone uses webhooks,
keep one instance running. On Fly.io, set in fly.toml:
[http_service]
auto_stop_machines = false
min_machines_running = 1The example file says the same thing: if anyone enables new-mail webhooks,
set auto_stop_machines = false and min_machines_running = 1 instead,
because the watchers only run while the machine does.