Skip to content

Commit e94fa72

Browse files
feat(doc): document project ENV vars
Exposed ENV vars are now documented in README. Internal/private are not documented.
1 parent 3fa5a56 commit e94fa72

File tree

2 files changed

+60
-4
lines changed

2 files changed

+60
-4
lines changed

.env.template

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ RAILS_ENCRYPTION_PRIMARY_KEY=RAILS_ENCRYPTION_PRIMARY_KEY
44
RAILS_ENCRYPTION_DETERMINISTIC_KEY=RAILS_ENCRYPTION_DETERMINISTIC_KEY
55
RAILS_ENCRYPTION_KEY_DERIVATION_SALT=RAILS_ENCRYPTION_KEY_DERIVATION_SALT
66

7-
# Github API
8-
GITHUB_AUTHENTICATION_TOKEN=GITHUB_AUTHENTICATION_TOKEN
9-
GITHUB_REPORT_REMOVED_MERCHANTS_ISSUE_ID=GITHUB_REPORT_REMOVED_MERCHANTS_ISSUE_ID
10-
117
# Feature Flag (boolean true/false)
128
FF_COMMENTS_ENABLED=FF_COMMENTS_ENABLED
139
FF_ANALYTICS_ENABLED=FF_ANALYTICS_ENABLED
1410
FF_SNOWFLAKES_ENABLED=FF_SNOWFLAKES_ENABLED
11+
DEBUGBAR_ENABLED=DEBUGBAR_ENABLED

README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ A voluntary, non-partisan collective whose aim is to offer legal, peaceful and s
1313
- [Tech Stack](#-tech-stack)
1414
- [Getting Started](#-getting-started)
1515
- [Available Commands](#-available-commands)
16+
- [ENV vars](#-env-vars)
1617
- [Merchant Data](#-merchant-data)
1718
- [Map Routing](#-map-routing)
1819
- [Internationalization](#-internationalization)
@@ -99,12 +100,70 @@ bank-exit(dev)> FetchMerchants.call
99100
100101
## 💻 Available Commands
101102

103+
- `bin/setup` – Initial setup of the Rails project including dependencies, ENV, database, ...
102104
- `bin/dev` – Start processes defined in [Procfile](Procfile) (web and css)
103105
- `bin/rails server` – Start the Rails server only
104106
- `bin/rails db:migrate` – Run migrations to database
105107
- `bin/rails sitemap:refresh:no_ping` – Regenerate the sitemap
106108
- `bundle exec chusaku` – Annotate Rails controllers with route info
107109

110+
## 🌿 ENV vars
111+
112+
<table>
113+
<caption>List of project ENV vars</caption>
114+
<tr>
115+
<th>Name</th>
116+
<th>Description</th>
117+
<th>Value</th>
118+
<th>Resource</th>
119+
</tr>
120+
<tr>
121+
<td>SECRET_KEY_BASE</td>
122+
<td>Key used to generate and verify cryptographic signatures for cookies, sessions, and other encrypted or signed data</td>
123+
<td>Run `bin/rails secret`</td>
124+
<td>
125+
<a href="https://guides.rubyonrails.org/security.html">Security guide</a>
126+
</td>
127+
</tr>
128+
<tr>
129+
<td>RAILS_ENCRYPTION_PRIMARY_KEY</td>
130+
<td rowspan="3">Keys used to securely encrypt, decrypt, and deterministically query Active Record attributes in the database.</td>
131+
<td rowspan="3">Run `bin/rails db:encryption:init`</td>
132+
<td rowspan="3">
133+
<a href="https://guides.rubyonrails.org/active_record_encryption.html">Active Record Encryption guide</a>
134+
</td>
135+
</tr>
136+
<tr>
137+
<td>RAILS_ENCRYPTION_DETERMINISTIC_KEY</td>
138+
</tr>
139+
<tr>
140+
<td>RAILS_ENCRYPTION_KEY_DERIVATION_SALT</td>
141+
</tr>
142+
<tr>
143+
<td>FF_COMMENTS_ENABLED</td>
144+
<td>Feature flag to enable globally comments</td>
145+
<td>`true` or `false`</td>
146+
</tr>
147+
<tr>
148+
<td>FF_ANALYTICS_ENABLED</td>
149+
<td>Feature flag to enable admin analytics</td>
150+
<td>`true` or `false`</td>
151+
</tr>
152+
<tr>
153+
<td>FF_SNOWFLAKES_ENABLED</td>
154+
<td>Feature flag to enable Christmas snowflakes</td>
155+
<td>`true` or `false`</td>
156+
</tr>
157+
<tr>
158+
<td>DEBUGBAR_ENABLED</td>
159+
<td>Enable debugbar (limited to development and staging environments)</td>
160+
<td>`true` or `false`</td>
161+
<td>
162+
<a href="https://debugbar.dev">Debugbar site</a>
163+
</td>
164+
</tr>
165+
</table>
166+
108167
## 🏪 Merchant Data
109168

110169
Merchant data that populate the map are retrieved dynamically from the [Overpass](https://overpass-turbo.eu/) API.

0 commit comments

Comments
 (0)