-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Update main Reaction app to use .env file
#4826
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
Conversation
|
The one CI check failure is a known issue with feature deployment script that @griggheo is fixing separately. |
ticean
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aldeed. This is good and it'll be easier to manage now. I made a comment on the setup script path. Not a blocker if you feel strongly about it but consistent paths to the common tooling scripts would be nice.
spencern
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can safely set the polling frequency to 10s and keep almost 100% of the performance improvements that we get at 60s
We might be able to go lower than that, but I haven't tested below 10000ms
@spencern says: I think we can safely reduce this to 10000 based on some testing I've done.
|
@spencern All comments resolved |
spencern
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will help quite a bit. 👍
Resolves #4706
Impact: minor
Type: feature
Issue
Most services that make up the Reaction platform use a
.envfile in the root of the service folder to define environment variables that should be set while running. They also have apre-buildscript that the reaction-platform tool runs to create or update the.envfile from a.env.examplefile, which is committed.The Reaction API service does not have these.
Solution
Add the
.env-related files.Also added two environment variables to
.env.example, based on discussions elsewhere:Breaking changes
If you run Reaction locally, such as for development, you will now need to be sure there is a
.envfile with correct environment variables set in it. The.env.examplefile, with no changes, should work for most people. When running withreaction-platform, this should happen automatically. But if you've already been developing locally and you pull in this change, you'll need to runbin/setuponce. You can also runbin/setupanytime you pull in the future, to add any new ENV variables.How to run locally outside of Docker
While we recommend always developing within Docker (as part of Reaction Platform) it is possible to run locally directly on your host machine (Linux or OSX). If you do this, you'll need a
.envfile with slightly different URLs. Copy.envto.env.localand update.env.localto look like this:We've simply changed
hydraandmongohostnames tolocalhost. Everything else is the same.You can now run directly on your host machine, after starting
mongoandhydraservices in Docker, with this command:Testing
Follow the instructions for creating the
.env, and then make sure that the app starts, and run some simple smoke tests.