Deployment
Before the first customer.
Work through this list before the product is reachable by anyone else.
Secrets and accounts
- Set a long, random
JWT_SECRET. - Change the passwords of the sample accounts the seed creates, or delete them.
- Set
DEMO_MODE=falseandNEXT_PUBLIC_DEMO_MODE=false, then runyarn remove:demoin each app to delete the demo code.
Addresses
- Set
NEXT_PUBLIC_SITE_URL,NEXT_PUBLIC_DASHBOARD_URLandNEXT_PUBLIC_API_BASE_URLto your public addresses, and build the two frontends again. - Set
CORS_ORIGINto the website's and the dashboard's origins, andDASHBOARD_URLandPUBLIC_API_URLto the addresses people use. - Behind a reverse proxy, set
TRUST_PROXYso rate limits see the visitor's address.
Data and files
- Use MySQL for a shared deployment (
DB_TYPE=mysqlwith theDB_settings), and back it up. - Set the five
R2_variables, or make sureMEDIA_UPLOAD_DIRis on a disk that survives a redeploy.
Payments and mail
- Set
BILLING_PROVIDER=stripe, your liveSTRIPE_SECRET_KEY, and the webhook'sSTRIPE_WEBHOOK_SECRET. - Configure SMTP so invitations and password resets reach people.
- The license checkout takes cards with the same live
STRIPE_SECRET_KEY. SetPAYPAL_CLIENT_ID,PAYPAL_CLIENT_SECRETandPAYPAL_ENV=liveto take PayPal too. SetNEXT_PUBLIC_PURCHASE_URL_SINGLEandNEXT_PUBLIC_PURCHASE_URL_STUDIOonly to sell through an outside store instead.
Build and start
yarn build
yarn startRun them in each frontend; the API builds with yarn build and starts with yarn start:prod.