Fix/update server docs env (#464)

* Updated env vars table for server

* Updated sample env file for docker compose
This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-07-26 18:57:32 -07:00
1 parent 3377523f93
commit a58e0ef981
1 file changed
+23 -17
+23 -17
View File
@@ -84,14 +84,17 @@ To get the application up and running you need to:
``` ```
CLIENT_HOST="http://localhost:5173" CLIENT_HOST="http://localhost:5173"
JWT_SECRET="my_secret" JWT_SECRET=<jwt_secret>
DB_TYPE="MongoDB" DB_TYPE="MongoDB"
DB_CONNECTION_STRING="mongodb://mongodb:27017/uptime_db" DB_CONNECTION_STRING="mongodb://mongodb:27017/uptime_db"
REDIS_HOST="redis" REDIS_HOST="redis"
REDIS_PORT=6379 REDIS_PORT=6379
SYSTEM_EMAIL_ADDRESS="<email>" TOKEN_TTL="99d"
SENDGRID_API_KEY="<api_key>" PAGESPEED_API_KEY=<api_key>
LOGIN_PAGE_URL="<login_page" SYSTEM_EMAIL_HOST="smtp.gmail.com"
SYSTEM_EMAIL_PORT=465
SYSTEM_EMAIL_ADDRESS=<system_email>
SYSTEM_EMAIL_PASSWORD=<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: 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: Configure the server with the following environmental variables:
| ENV Variable Name | Required/Optional | Type | Description | Accepted Values | | ENV Variable Name | Required/Optional | Type | Description | Accepted Values |
| -------------------- | ----------------- | --------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------ | | --------------------- | ----------------- | --------- | ---------------------------------------- | ------------------------------------------------ |
| CLIENT_HOST | Required | `string` | Frontend Host | | | CLIENT_HOST | Required | `string` | Frontend Host | |
| JWT_SECRET | Required | `string` | JWT secret | | | JWT_SECRET | Required | `string` | JWT secret | |
| DB_TYPE | Optional | `string` | Specify DB to use | `MongoDB \| FakeDB` | | DB_TYPE | Optional | `string` | Specify DB to use | `MongoDB \| FakeDB` |
| DB_CONNECTION_STRING | Required | `string` | Specifies URL for MongoDB Database | | | DB_CONNECTION_STRING | Required | `string` | Specifies URL for MongoDB Database | |
| PORT | Optional | `integer` | Specifies Port for Server | | | PORT | Optional | `integer` | Specifies Port for Server | |
| SENDGRID_API_KEY | Required | `string` | Specifies API KEY for SendGrid email service | | | LOGIN_PAGE_URL | Required | `string` | Login url to be used in emailing service | |
| SYSTEM_EMAIL_ADDRESS | Required | `string` | Specifies System email to be used in emailing service, must be a verified email by sendgrid | | | REDIS_HOST | Required | `string` | Host address for Redis database | |
| LOGIN_PAGE_URL | Required | `string` | Login url to be used in emailing service | | | REDIS_PORT | Required | `integer` | Port for Redis database | |
| REDIS_HOST | Required | `string` | Host address for Redis database | | | TOKEN_TTL | Optional | `string` | Time for token to live | In vercel/ms format https://github.com/vercel/ms |
| REDIS_PORT | Required | `integer` | Port for Redis database | | | PAGESPEED_API_KEY | Optional | `string` | API Key for PageSpeed requests | |
| TOKEN_TTL | Optional | string | Time for token to live | In vercel/ms format https://github.com/vercel/ms | | 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 | |
<br/> <br/>