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

Config refactor #102

Merged
merged 58 commits into from
Aug 6, 2024
Merged

Config refactor #102

merged 58 commits into from
Aug 6, 2024

Conversation

unenglishable
Copy link
Member

moves env-configurable parts of project to config/runtime

consolidates configurations and improves automatic/default handling of different environments (dev, test, prod)

standardizes frontend config to store to database as a map with string keys and load into env as a map with atom keys

configure rate limiter within its own module (may change in the future)

provides additional message when raising error
use get_env_or_raise/_with_message

use defaults in System.get_env

cast port string to integer
works the same in all envs
remove from config/config
move from prod in runtime
configuration now happens in init() and is called in config/runtime.exs
when running in dev or test, this is a useful default

production should set it to true when necessary
…lication env

use ExUtils.Map.atomize_keys/2 when loading configs from database

add warning to use atom keys
extracts code from config warmer; loads config from env and stores to db
then returns config as map with string keys
when configs are loaded from env, they are also returned from db create
call, so keys are string in that case as well:  atomize them
@akinsey akinsey merged commit db0db97 into main Aug 6, 2024
10 checks passed
@akinsey akinsey deleted the config-refactor branch August 6, 2024 20:31
Copy link

github-actions bot commented Aug 6, 2024

🎉 This PR is included in version 1.32.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants