From a58e0ef981b69755dfba5e2ca4e58005e73ef1f6 Mon Sep 17 00:00:00 2001 From: Alexander Holliday Date: Fri, 26 Jul 2024 18:57:32 -0700 Subject: [PATCH] Fix/update server docs env (#464) * Updated env vars table for server * Updated sample env file for docker compose --- README.md | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index c1d645004..26ac9f275 100644 --- a/README.md +++ b/README.md @@ -84,14 +84,17 @@ To get the application up and running you need to: ``` CLIENT_HOST="http://localhost:5173" -JWT_SECRET="my_secret" +JWT_SECRET= DB_TYPE="MongoDB" DB_CONNECTION_STRING="mongodb://mongodb:27017/uptime_db" REDIS_HOST="redis" REDIS_PORT=6379 -SYSTEM_EMAIL_ADDRESS="" -SENDGRID_API_KEY="" -LOGIN_PAGE_URL=" +SYSTEM_EMAIL_HOST="smtp.gmail.com" +SYSTEM_EMAIL_PORT=465 +SYSTEM_EMAIL_ADDRESS= +SYSTEM_EMAIL_PASSWORD= ``` 3. In the `Docker` directory, create a `client.env` file with the [required environtmental variables](#env-vars-client) for the client. Sample file: @@ -145,19 +148,22 @@ That's it, the application is ready to use on port 5173. Configure the server with the following environmental variables: -| ENV Variable Name | Required/Optional | Type | Description | Accepted Values | -| -------------------- | ----------------- | --------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------ | -| CLIENT_HOST | Required | `string` | Frontend Host | | -| JWT_SECRET | Required | `string` | JWT secret | | -| DB_TYPE | Optional | `string` | Specify DB to use | `MongoDB \| FakeDB` | -| DB_CONNECTION_STRING | Required | `string` | Specifies URL for MongoDB Database | | -| PORT | Optional | `integer` | Specifies Port for Server | | -| SENDGRID_API_KEY | Required | `string` | Specifies API KEY for SendGrid email service | | -| SYSTEM_EMAIL_ADDRESS | Required | `string` | Specifies System email to be used in emailing service, must be a verified email by sendgrid | | -| LOGIN_PAGE_URL | Required | `string` | Login url to be used in emailing service | | -| REDIS_HOST | Required | `string` | Host address for Redis database | | -| REDIS_PORT | Required | `integer` | Port for Redis database | | -| TOKEN_TTL | Optional | string | Time for token to live | In vercel/ms format https://github.com/vercel/ms | +| ENV Variable Name | Required/Optional | Type | Description | Accepted Values | +| --------------------- | ----------------- | --------- | ---------------------------------------- | ------------------------------------------------ | +| CLIENT_HOST | Required | `string` | Frontend Host | | +| JWT_SECRET | Required | `string` | JWT secret | | +| DB_TYPE | Optional | `string` | Specify DB to use | `MongoDB \| FakeDB` | +| DB_CONNECTION_STRING | Required | `string` | Specifies URL for MongoDB Database | | +| PORT | Optional | `integer` | Specifies Port for Server | | +| LOGIN_PAGE_URL | Required | `string` | Login url to be used in emailing service | | +| REDIS_HOST | Required | `string` | Host address for Redis database | | +| REDIS_PORT | Required | `integer` | Port for Redis database | | +| TOKEN_TTL | Optional | `string` | Time for token to live | In vercel/ms format https://github.com/vercel/ms | +| PAGESPEED_API_KEY | Optional | `string` | API Key for PageSpeed requests | | +| SYSTEM_EMAIL_HOST | Required | `string` | Host to send System Emails From | | +| SYSTEM_EMAIL_PORT | Required | `number` | Port for System Email Host | | +| SYSTEM_EMAIL_ADDRESS | Required | `string` | System Email Address | | +| SYSTEM_EMAIL_PASSWORD | Required | `string` | System Email Password | |