Skip to content

Commit 1599fe1

Browse files
refactor(docs): Updates Environment Variable docs (#300)
* refactor(docs): Updates Environment Variable docs * Update docs/deployment-environment-variables.md Co-authored-by: Peter Kos <pkos91@icloud.com> * refactor: Redesigns EV page * Update docs/deployment-environment-variables.md Co-authored-by: Peter Kos <pkos91@icloud.com> * refactor: Adds optional notice Co-authored-by: Peter Kos <pkos91@icloud.com>
1 parent 69e8d6e commit 1599fe1

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

docs/deployment-environment-variables.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,21 @@ id: deployment-environment-variables
33
title: Environment Variables
44
---
55

6-
Various services require environment variables to operate.
6+
Various services require environment variables to operate. While they may appear overwhelming, this setup guide aims to alleviate some of the concern.
77

8-
**The following environment variables should be present on all deployments.** Below is an example:
8+
> Stuck on an environment variable? codeRIT is here to help! [Send us an email](mailto:engineering@coderit.org) with any questions.
9+
10+
## Required
11+
**The following environment variables are required for HackathonManager to function.**
12+
13+
### Secret keys
914

1015
```bash
1116
SECRET_KEY_BASE="<randomly generated string>"
1217
DEVISE_SECRET_KEY="<randomly generated string>"
13-
HM_DOMAIN_NAME="apply.example.com"
14-
MLH_KEY="my-mlh-application-id"
15-
MLH_SECRET="my-mlh-secret"
16-
AWS_BUCKET="my-example-bucket"
17-
AWS_ACCESS_KEY_ID="<AWS access key ID>"
18-
AWS_SECRET_ACCESS_KEY="<AWS secret key>"
19-
AWS_REGION="us-east-1"
20-
ROLLBAR_ACCESS_TOKEN="<server-side rollbar token>"
21-
SENDGRID_API_KEY="<sendgrid api key>"
22-
TIME_ZONE="America/New_York"
2318
```
2419

25-
_Also see [app.json](https://github.com/codeRIT/hackathon_manager/blob/master/app.json)_
26-
27-
### Secret keys
28-
29-
`SECRET_KEY_BASE` and `DEVISE_SECRET_KEY` are required for the app to run. You can generate secrets via `bundle exec rake secret`. This "secret" is a 64-byte hexadecimal string (128 characters). You could also generate this with `head -c 64 /dev/urandom | xxd -ps -c 128` if you are on a standard Linux distribution.
20+
You can generate secrets via `bundle exec rake secret`. This "secret" is a 64-byte hexadecimal string (128 characters). You could also generate this with `head -c 64 /dev/urandom | xxd -ps -c 128` if you are on a standard Linux distribution.
3021

3122
### Mailer domain
3223

@@ -35,9 +26,9 @@ HM_DOMAIN_NAME=""
3526
HM_DOMAIN_PROTOCOL="" # optional, https by default
3627
```
3728

38-
### Resumes and S3
29+
This is needed to allow HackathonManager to send email on behalf of your hackathon's domain.
3930

40-
Resumes are stored locally in development and on S3 in production.
31+
### Amazon S3 and Resumes
4132

4233
```bash
4334
AWS_BUCKET=""
@@ -46,6 +37,9 @@ AWS_SECRET_ACCESS_KEY=""
4637
AWS_REGION=""
4738
```
4839

40+
Resumes for hackers are stored on [Amazon S3](https://aws.amazon.com/s3/).
41+
42+
### Other providers
4943
If you're using a third-party S3 provider, such as [Minio](https://min.io), also specify the custom endpoint.
5044

5145
```bash
@@ -64,17 +58,17 @@ Emails can be sent using [SendGrid](https://sendgrid.com) or traditional SMTP.
6458

6559
#### SendGrid
6660

61+
```bash
62+
SENDGRID_API_KEY=""
63+
```
64+
6765
[SendGrid](https://sendgrid.com) is the recommended email provider, and provides a free plan suitable for most hackathons.
6866

6967
Create a SendGrid API key to get started. During the setup process you will be asked to authenticate your sending domain with SendGrid. For guidance on this process please visit [SendGrid Domain Authentication Support](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). If you would like to maintain your sending reputation and stay out of the spam folder, we reccomend enabling [SendGrid Link Branding](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) when asked during the setup process.
7068

7169

7270
>During the verification process ensure you have replaced `hello@example.com` with your own domain in your HackathonManager config. SendGrid will deny the email as you are not authenticated to send on behalf of `example.com`.
7371
74-
```bash
75-
SENDGRID_API_KEY=""
76-
```
77-
7872
#### SMTP
7973

8074
>Sending email with SMTP over a personal or school email address (such as Gmail) is **NOT** recommended. Your hackathon may easily send several hundred to a few thousand emails during months leading up to the event, which regular email accounts block and may get reported for spam.
@@ -90,37 +84,43 @@ SMTP_AUTHENTICATION="" # optional, "plain" by default
9084
SMTP_STARTTLS_AUTO="" # optional, "true" by default
9185
```
9286

93-
### Rollbar
87+
### Time Zone
9488

95-
Rollbar captures and notifies of errors in production, and requires a server-side access token.
89+
>HackathonManager will crash at startup if the time zone isn't valid.
90+
>
91+
>To find your appropriate time zone (e.g. `America/New_York`), see "TZ database name" on [Wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
9692
9793
```bash
98-
ROLLBAR_ACCESS_TOKEN=""
94+
TIME_ZONE="America/Los_Angeles"
9995
```
10096

101-
### My MLH
97+
By default, charts & timestamps will be in UTC.
98+
99+
## Optional
100+
**The following environment variables are optional but add additional functionality.**
102101

103-
My MLH provides us authentication & initial application information.
102+
### MyMLH
103+
104+
```bash
105+
MLH_KEY=""
106+
MLH_SECRET=""
107+
```
108+
109+
[MyMLH](https://my.mlh.io/) makes it easy for hackers to quickly onboard themselves into HackathonManager. With MyMLH, hackers can save time by skipping fields in the questionnaire where the answer is already provided on their MyMLH profiles.
104110

105111
1. Create an account at https://my.mlh.io
106112
2. Click "My Apps" in the top navbar
107113
3. Click "Create new app"
108114
4. Fill out the app name & logo
109115
5. For "Redirect URI", fill in https://apply.your-hackathon.com/users/auth/mlh/callback
110116

117+
### Rollbar
118+
111119
```bash
112-
MLH_KEY=""
113-
MLH_SECRET=""
120+
ROLLBAR_ACCESS_TOKEN=""
114121
```
115122

116-
### Time Zone
123+
[Rollbar](https://rollbar.com/) captures and notifies of errors in production, and requires a server-side access token.
117124

118-
By default, charts & timestamps will be in UTC.
119125

120-
>HackathonManager will crash at startup if the time zone isn't valid.
121-
>
122-
>To find your appropriate time zone (e.g. `America/New_York`), see "TZ database name" on [Wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
123126

124-
```bash
125-
TIME_ZONE="America/Los_Angeles"
126-
```

0 commit comments

Comments
 (0)