-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Update main Reaction app to use .env
file
#4826
Conversation
The one CI check failure is a known issue with feature deployment script that @griggheo is fixing separately. |
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.
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 |
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
.env
file in the root of the service folder to define environment variables that should be set while running. They also have apre-build
script that the reaction-platform tool runs to create or update the.env
file from a.env.example
file, 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
.env
file with correct environment variables set in it. The.env.example
file, 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/setup
once. You can also runbin/setup
anytime 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
.env
file with slightly different URLs. Copy.env
to.env.local
and update.env.local
to look like this:We've simply changed
hydra
andmongo
hostnames tolocalhost
. Everything else is the same.You can now run directly on your host machine, after starting
mongo
andhydra
services 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.