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

Revisit and set the default value for some environment variables #460

Closed
hoangmirs opened this issue Aug 29, 2023 · 0 comments · Fixed by #511
Closed

Revisit and set the default value for some environment variables #460

hoangmirs opened this issue Aug 29, 2023 · 0 comments · Fixed by #511
Assignees

Comments

@hoangmirs
Copy link
Contributor

hoangmirs commented Aug 29, 2023

Why

  • The following variables are required when we deploy a Rails application from our template:
  MAILER_DEFAULT_HOST: "localhost"
  MAILER_DEFAULT_PORT: "3000"
  MAILER_SENDER: "Test <[email protected]>"
  AVAILABLE_LOCALES: "en"
  DEFAULT_LOCALE: "en"
  FALLBACK_LOCALES: "en"
  • But they can be set a default value instead of setting them every time we set up the CD
  • IMO, we can use the current value for them when we fetch the value in the code:
config.i18n.available_locales = ENV.fetch('AVAILABLE_LOCALES', 'en').split(',')
  • Sometimes, we forget to set them when deploying, and then it fails but it will take time to investigate that issue with some new members.

Who Benefits?

Developers

@sanG-github sanG-github self-assigned this Apr 11, 2024
github-merge-queue bot pushed a commit that referenced this issue Apr 29, 2024
…es (#511)

* Add default value for MAILER_DEFAULT_HOST

* Add default value for MAILER_DEFAULT_PORT

* Add default value for AVAILABLE_LOCALES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants