Skip to content

Commit 11984a0

Browse files
committed
Added environment variables docs
1 parent 86b0cf7 commit 11984a0

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The VTMUNC website is hosted on an Amazon EC2 instance, which serves as the core
2929
## Table Of Contents:
3030

3131
- [🚀 Set Up](#-set-up)
32+
- [⚙️ Environment Variables File](docs/env-file.md)
3233
- [📂 Project Overview](docs/project-overview.md)
3334
- [📙 Site Overview](docs/site-overview.md)
3435
- [🎨 Style Guide](docs/style-guide.md)
@@ -74,7 +75,7 @@ The VTMUNC website is hosted on an Amazon EC2 instance, which serves as the core
7475
cp ../docs/assets/env.template .env
7576
```
7677

77-
Open the `.env` file and fill in the necessary environment variables as per your project's requirements.
78+
Open the `.env` file and fill in the necessary environment variables according to [these instructions](docs/env-file.md).
7879

7980
5. **Start the Development Server**
8081

docs/deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ The VTMUNC website is hosted on an Amazon EC2 instance, which serves as the core
9696
2. **Add the Following Environment Variables**:
9797
- **DOCKERHUB_USERNAME**: Your DockerHub username.
9898
- **DOCKERHUB_PASSWORD**: Your DockerHub password.
99-
- **ENV_FILE**: The content of your environment file (you can store sensitive data here if needed).
99+
- **ENV_FILE**: The content of your environment file. The instructions for filling this file are in [env-file docs](./env-file.md)
100100
101101
Instructions for adding a secret:
102102
- Click `New repository secret`.

docs/env-file.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# ⚙️ Environment Variables File
2+
3+
This file defines environment variables used by VTMUNC. Note, that this env file is seperate from the environment variables for GitHub, where you need to paste in this environment variable file as a variable called ENV_FILE. Find out more from the [deployment docs](./deployment.md#step-7-set-environment-variables-in-github)
4+
5+
## Important security notice
6+
Never, commit .env files to any remote repository, including GitHub. Only share this environment variable with trusted personell.
7+
8+
## Environment Variables in .env file
9+
| Variable Name | Description | Example Value |
10+
|---|---|---|
11+
| AWS_DYNAMODB_ACCESS_KEY_ID | Your AWS DynamoDB access key ID. Refer to "Obtaining AWS Credentials Securely" to obtain this value. | `JKSOKJSDO` (fake) |
12+
| AWS_DYNAMODB_SECRET_ACCESS_KEY | Your AWS DynamoDB secret access key. Refer to "Obtaining AWS Credentials Securely" to obtain this value. | `sb0lasoiwkdouwedfes` (fake) |
13+
| AWS_DEFAULT_REGION | The default AWS region your application will use | `us-east1` |
14+
| BACKEND_URL | The URL of your backend API | | `localhost:3000/api` |
15+
| USERNAME | The admin username | `randomemail@gmail.com` (fake) |
16+
| PASSWORD | The admin password | `randOMPassWordForMUN&283` (fake) |
17+
| JWT_SECRET | A secret key used for generating JSON Web Tokens (JWTs) for authentication. | `okmasfq;eiuidf` (fake) |
18+
19+
## Obtaining AWS Credentials Securely
20+
21+
1. Go to the AWS Management Console and navigate to the IAM service.
22+
2. In the IAM service, select "Users" from the navigation pane.
23+
3. Click on "Add user".
24+
4. Provide a name for the user and choose "Programmatic access" as the access type.
25+
5. Deselect "Attach existing policies directly" and click on "Next: Permissions".
26+
6. In the search bar, type "AdministratorAccess" and select the policy.
27+
7. Click on "Next: Review".
28+
8. Review the details of the user and click on "Create user".
29+
9. Download the credentials (access key ID and secret access key) for the newly created user.
30+

0 commit comments

Comments
 (0)