Deployment
PostgreSQL, S3-compatible storage, SMTP, migrations and Railway.
Needs
- PostgreSQL you are allowed to migrate.
- S3-compatible storage.
S3_BUCKET_NAME,S3_REGION,S3_ACCESS_KEY_ID,S3_SECRET_ACCESS_KEYandS3_ENDPOINTare required at startup. - SMTP (
SMTP_HOST,SMTP_PORT,SMTP_USER,SMTP_PASSWORD,SMTP_FROM,SMTP_STORE_LINK) for reset, receipt and gift card emails. - Optional:
STRIPE_SECRET_KEYandSTRIPE_WEBHOOK_SECRET,OPENROUTER_API_KEY,OPENROUTER_MODEL.
Settings that change behavior
| Variable | Effect |
|---|---|
MEDSPA_PRACTICE_SLUG | Practice the storefront serves when several are published |
TAX_RATE | Checkout tax as a fraction from 0 to 1; overrides Practice.taxRate |
MEDSPA_INTAKE_MAX_AGE_DAYS | Maximum age of reviewed intake accepted for clinical work. Unset: clinical plan and readiness checks that need intake evidence fail |
CLINICAL_ASSET_KMS_KEY_ID, CLINICAL_ASSET_REGION | Recorded on clinical asset intents |
Deploy
Set the environment
Add the variables above to the host.
Migrate
npm run migrate runs prisma migrate deploy. railway.toml does this at start. Use npm run migrate:gen only on a disposable database.
Build and start
keystone build --no-ui && next build, then next start.
First operator and onboarding
Open /dashboard/init, then complete onboarding.