Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables documentation #1089

Merged
merged 3 commits into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/dev/back/config_environment_variables.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the whole point of having searches instead of listing out a table was because the table will quickly become obsolete and gives people a false sense of knowledge. Please remove.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Configuring Environment Variables

The search results below identify some environment variables that need to be manually configured.

#### DB, Webserver, Push Config
- Use this [search](https://github.com/search?q=repo%3Ae-mission%2Fe-mission-server+%2Fconfig.get%5C%28%5C%22%5BA-Z%5D%2F&type=code) to obtain usage of `DB, WEBSERVER, PUSH` environment variables in the [e-mission-server](https://github.com/e-mission/e-mission-server) repository.

#### AWS Cognito Credentials

- Use this [search](https://github.com/search?q=repo%3Ae-mission%2Fop-admin-dashboard+%2F.getenv%5C%28%5C%22%5BA-Z%5D%2F&type=code) to obtain usage of `COGNITO` variables in the [admin-dashboard](https://github.com/e-mission/op-admin-dashboard) repository.

#### Overpass, Nominatim, Geofabrik

- Use this [search](https://github.com/search?q=repo%3Ae-mission%2Fe-mission-server+%2F.environ.get%5C%28%5C%22%5BA-Z%5D%2F&type=code) to obtain usage of `Overpass, Nominatim, Geofabrik` environment variables in the [e-mission-server](https://github.com/e-mission/e-mission-server) repository.
- Use this [search](https://github.com/search?q=repo%3Ae-mission%2Fe-mission-server+geofabrik&type=code) to view some variables that are set using GitHub secrets in the [e-mission-server](https://github.com/e-mission/e-mission-server) GitHub workflows.
Comment on lines +14 to +15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference between these two searches. the second seems to look for geofabrik, but you also list geofabrik in the first search.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With reference to Geofabrik, the 1st search lists GEOFABRIK_OVERPASS_KEY, GEOFABRIK_QUERY_URL.

In addition to these, the 2nd search also lists GFBK_KEY which is used as a suffix to GEOFABRIK_QUERY_URL in emission/integrationTests/docker-compose.yml.
This variable is set while running the docker compose file in a workflow file using a GitHub secret GEOFABRIK_API which is different from GEOFABRIK_OVERPASS_KEY.

This doesn't show up while searching for environ.get() since we are using it directly in the docker-compose file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. I am not sure we need to list the secrets for GitHub workflows, given that we don't really want people to be working on forks. However, I guess it could be useful at some point. The problem, though, is that if we add another secret to the GH workflow, it won't show up with this search.

We have gone back and forth enough times on this that I think that I am not going to force this change. But I fully expect it to bitrot within the next 5 years, at which point we should remove it. Let's see if I am correct!