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: support .env.testing and .env.e2e files #497

Closed
LoicPoullain opened this issue Jul 29, 2019 · 3 comments
Closed

Config: support .env.testing and .env.e2e files #497

LoicPoullain opened this issue Jul 29, 2019 · 3 comments

Comments

@LoicPoullain
Copy link
Member

Issue

Currently, Foal's configuration system supports environment variables, the .env file and JSON and YAML files in the config/ directory. In some situations, we may also want to have another uncommitted file .env.testing to store db credentials during testing.

Solution

Support .env.{NODE_ENV} files

@LoicPoullain LoicPoullain added this to Backlog in Issue tracking via automation Jul 29, 2019
@LoicPoullain LoicPoullain mentioned this issue Jul 29, 2019
8 tasks
@LoicPoullain LoicPoullain moved this from Backlog to To Do This Release (August) in Issue tracking Jul 29, 2019
@yaaminu
Copy link
Contributor

yaaminu commented Jul 29, 2019

@LoicPoullain I'm struggling to understand the utility of this since there's already a comprehensive way for adding configurations to a foal app. I suggest we stick to the existing approach and add a new test.{yml|json} configuration file for test environments.

@LoicPoullain
Copy link
Member Author

This will allow us to split sensitive information and simple settings in two different files if we want to (one committed and the other not). There is no obligation to use this approach and we will still be able to only use test.{yml|json} files if we prefer.

Another use case can be to start the app with our production DB. For example, by adding a .env.production file with the credentials and running the command NODE_ENV=production npm run start.

This is not a priority though. I'll remove it from August release to focus on social auth.

@LoicPoullain LoicPoullain moved this from To Do This Release (August) to Maybe / Pending / To think about in Issue tracking Aug 13, 2019
@LoicPoullain LoicPoullain moved this from Maybe / Pending / To think about to Work In Progress in Issue tracking Sep 4, 2020
This was referenced Sep 4, 2020
@LoicPoullain
Copy link
Member Author

Resolved in v2

Issue tracking automation moved this from Work In Progress to Done / Closed This Release Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Issue tracking
  
Done / Closed This Release
Development

No branches or pull requests

2 participants