Skip to content

Deployment

Before the first customer.

Work through this list before the product is reachable by anyone else.

Secrets and accounts

  1. Set a long, random JWT_SECRET.
  2. Change the passwords of the sample accounts the seed creates, or delete them.
  3. Set DEMO_MODE=false and NEXT_PUBLIC_DEMO_MODE=false, then run yarn remove:demo in each app to delete the demo code.

Addresses

  1. Set NEXT_PUBLIC_SITE_URL, NEXT_PUBLIC_DASHBOARD_URL and NEXT_PUBLIC_API_BASE_URL to your public addresses, and build the two frontends again.
  2. Set CORS_ORIGIN to the website's and the dashboard's origins, and DASHBOARD_URL and PUBLIC_API_URL to the addresses people use.
  3. Behind a reverse proxy, set TRUST_PROXY so rate limits see the visitor's address.

Data and files

  1. Use MySQL for a shared deployment (DB_TYPE=mysql with the DB_ settings), and back it up.
  2. Set the five R2_ variables, or make sure MEDIA_UPLOAD_DIR is on a disk that survives a redeploy.

Payments and mail

  1. Set BILLING_PROVIDER=stripe, your live STRIPE_SECRET_KEY, and the webhook's STRIPE_WEBHOOK_SECRET.
  2. Configure SMTP so invitations and password resets reach people.
  3. The license checkout takes cards with the same live STRIPE_SECRET_KEY. Set PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET and PAYPAL_ENV=live to take PayPal too. Set NEXT_PUBLIC_PURCHASE_URL_SINGLE and NEXT_PUBLIC_PURCHASE_URL_STUDIO only to sell through an outside store instead.

Build and start

yarn build
yarn start

Run them in each frontend; the API builds with yarn build and starts with yarn start:prod.

Next: Demo mode