From f8ddb21510dacdbbc948460a484a6e339655a1e7 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Wed, 12 Jul 2023 17:53:09 +0100 Subject: [PATCH] Added env var instructions to CONTRIBUTING.md --- CONTRIBUTING.md | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 294af238e..34363869d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,16 +38,46 @@ branch are tagged into a release monthly. ``` cp .env.example .env && cp packages/database/.env.example packages/database/.env ``` - Open the root `.env` file and fill in the required values. -6. Start Docker. This starts the required services like Postgres. +5. Open the root `.env` file and fill in the required values for these services: + +
+ Resend + +

We use https://resend.com for email sending (including the magic-link signup/login system). They have a generous free tier of 100 emails a day that should be sufficient. Signup for Resend.com and enter the required environment vars below.

+ + ``` + RESEND_API_KEY= + FROM_EMAIL= + REPLY_TO_EMAIL= + ``` +
+ +
+ Magic Link + +

Both of these secrets should be random strings, which you can easily generate (and copy into your pasteboard) with the following command:

+ + ```sh + openssl rand -hex 16 | pbcopy + ``` + +

Then set them here:

+ + ``` + SESSION_SECRET= + MAGIC_LINK_SECRET= + ``` +
+ +7. Start Docker. This starts the required services like Postgres. ``` pnpm run docker ``` -7. Migrate the database +8. Migrate the database ``` pnpm run db:migrate ``` -8. Run the seed script +9. Run the seed script ``` pnpm run db:seed ```