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_KEY and S3_ENDPOINT are 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_KEY and STRIPE_WEBHOOK_SECRET, OPENROUTER_API_KEY, OPENROUTER_MODEL.

Settings that change behavior

VariableEffect
MEDSPA_PRACTICE_SLUGPractice the storefront serves when several are published
TAX_RATECheckout tax as a fraction from 0 to 1; overrides Practice.taxRate
MEDSPA_INTAKE_MAX_AGE_DAYSMaximum 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_REGIONRecorded 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.

On this page