Deploy to DigitalOcean¶
DigitalOcean App Platform runs all three pieces in one app — the FastAPI container, a managed PostgreSQL, and the static app + landing. (Prefer a single server you control? See Self-Hosting for a droplet + Docker Compose.)
Outcome: API at api.yourdomain.com, app at app.yourdomain.com, landing at yourdomain.com.
1. Database¶
Create a Managed PostgreSQL database (Databases → Create) and copy its connection string for FS_DB_URL.
2. Backend (API)¶
- Create an App from your repo and add a Service built from
backend/Dockerfile. - Set environment variables (Configuration):
FS_DB_URL— the managed database connection stringFS_ENVIRONMENT=prod,FS_BASE_API_URL=https://api.yourdomain.com,FS_BASE_WEB_URL=https://app.yourdomain.comFS_JWT_SECRET_KEY,FS_CRON_SECRET, plus Stripe/email keys
- Run migrations against the managed DB:
./sqitch.sh prod deploy(from a console or your machine, with the prodFS_DB_URL). - Add the domain
api.yourdomain.comto the service.
3. App + landing (static sites)¶
Add two Static Site components from the same repo:
- frontend (
frontend/) — buildnpm run build; envPUBLIC_API_BASE_URL=https://api.yourdomain.com; domainapp.yourdomain.com. - landing (
landing/) — buildnpm run build; domainyourdomain.com.
4. Wire it together¶
Point DNS at the App Platform domains, confirm the FS_BASE_* URLs match the live ones, add the Stripe webhook at https://api.yourdomain.com/webhooks/stripe (Billing & Subscriptions), and run the Security checklist.