Deploy to DO App Platform
The repo includes a .do/app.yaml that provisions OpenPartner as a multi-service app with a
managed Postgres database.
What gets deployed
- api — Express HTTP service (port 8787)
- router — Hono click redirect service (port 8788)
- portal — Vite-built static site, served from CDN
- db — Managed Postgres (1GB minimum)
Steps
- Fork or clone
getcoherence/openpartnerto your GitHub. - In DO App Platform, Create App → GitHub and point it at your repo.
- Select the
.do/app.yamlspec when prompted. - Set required env vars (encrypted):
SECRETS_ENCRYPTION_KEY— 32-byte hexMAIL_FROM(optional — overridable from admin UI)POSTMARK_SERVER_TOKENor SMTP creds (optional — overridable from admin UI)
- Click Create Resources.
Once the build completes, visit your app URL. The install wizard runs on first load.
Custom domain
Add your apex domain in DO App Platform → Settings → Domains. DO handles cert provisioning.
For the click router, point a subdomain like r.yourdomain.com to the router service for short
links.
File uploads (brand logos, creator avatars)
App Platform containers are ephemeral — local-disk storage gets wiped on every redeploy. For production, use DO Spaces (S3-compatible) so uploaded logos and avatars survive deploys.
-
Create a Spaces bucket in the same region as your app.
-
Generate a Spaces access key under API → Spaces Keys.
-
Add these env vars on the api component (encrypted):
OPENPARTNER_STORAGE_KIND=s3OPENPARTNER_STORAGE_S3_BUCKET=<bucket name>OPENPARTNER_STORAGE_S3_REGION=<bucket region, e.g. nyc3>OPENPARTNER_STORAGE_S3_ENDPOINT=https://<region>.digitaloceanspaces.comOPENPARTNER_STORAGE_S3_ACCESS_KEY_ID=<key>OPENPARTNER_STORAGE_S3_SECRET_ACCESS_KEY=<secret>If you’ve enabled the bucket’s CDN, also set
OPENPARTNER_STORAGE_S3_PUBLIC_BASE=https://<bucket>.<region>.cdn.digitaloceanspaces.com. -
If you’re running the Network as a separate app, repeat with the
NETWORK_prefix on that app’s component. You can use the same bucket with different key prefixes — the storage layer namespaces undertenants/.../logos/andcreators/.../avatars/.
Files written to Spaces get public-read ACL with a 1-year immutable cache header. Object
keys are random hex (16 bytes), so make sure the bucket’s “Restrict File Listing” is on.
Updating
Push to your main branch — DO redeploys automatically.