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

dev: Reorganize and document the env files #917

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

marien-probesys
Copy link
Member

@marien-probesys marien-probesys commented Jan 14, 2025

Context

While working on #916, I've realized that I could greatly improve the handling of environment variables in the application, especially to avoid the weird default: env var processor. The idea was to declare all the "production" environment variables in the .env file.

Then, I wasn't happy with the default values being those for the development environment. The .env variables are now suitable for production. The only exception is the APP_ENV variable which is set to dev in order to ease the workflow in development.

The development variables are now declared in a .env.dev file. This implied to copy some of them in the .env.test as well.

The consequences are:

  1. production is not setup anymore with default (but not working) APP_SECRET, DATABASE_URL, MAILER_DSN, etc.
  2. development variables must be overridden in a .env.dev.local file (.env.local doesn't work anymore to override e.g. DATABASE_URL)

I've also reorganized the environment variables in the env files, added documentation to explain how to manage these files, and put all the strings between strings.

This PR must be merged after the release of Bileto 0.14.0 to give me time to fix potential bugs due to these changes.

I want to test these changes with the prod Docker image too.

Related issue(s)

N/A

How to test manually

  1. Run the application in dev / test / prod
  2. Verify that it works

Reviewer checklist

  • Code is manually tested
  • Permissions / authorizations are verified
  • New data can be imported
  • Interface works on both mobiles and big screens
  • Interface works in both light and dark modes
  • Interface works on both Firefox and Chrome
  • Accessibility has been tested
  • Translations are synchronized
  • Tests are up to date
  • Copyright notices are up to date
  • Documentation is up to date
  • Pull request has been reviewed and approved

@marien-probesys marien-probesys force-pushed the tec/reorganize-env-files branch 3 times, most recently from 322c3f8 to e7170a2 Compare January 14, 2025 13:13
@marien-probesys marien-probesys added this to the Version 0.15 milestone Jan 14, 2025
@marien-probesys marien-probesys force-pushed the tec/reorganize-env-files branch 2 times, most recently from 15d9eee to ce210e5 Compare January 14, 2025 13:18
@marien-probesys marien-probesys force-pushed the tec/reorganize-env-files branch from ce210e5 to c10ec23 Compare January 29, 2025 13:41
@marien-probesys marien-probesys force-pushed the tec/reorganize-env-files branch from c10ec23 to 341aa50 Compare January 30, 2025 10:20
@marien-probesys marien-probesys merged commit 341aa50 into main Jan 30, 2025
6 checks passed
@marien-probesys marien-probesys deleted the tec/reorganize-env-files branch January 30, 2025 10:26
@marien-probesys marien-probesys self-assigned this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant