-
Notifications
You must be signed in to change notification settings - Fork 8
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
add stats summary endpoint #2123
Conversation
- add njs scritp and its realted configurations - update docker file
Do we need to implement retries 3 times and/or return back default values if it failed? @AhmedHanafy725 |
|
packages/new_stats/Dockerfile
Outdated
@@ -8,5 +8,6 @@ COPY . /app/ | |||
RUN yarn install | |||
RUN yarn lerna run build --no-private && yarn workspace @threefold/newstats build | |||
|
|||
FROM nginx:1.16.0-alpine | |||
FROM nginx:alpine |
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 prefer to have a certain version, so it does not get crashed because a new Alpine image is released.
Description
Using nginx javascript we can run a script whenever the user hit the target endpoint, the mentioned endpoint is
/api/stats-summary
, this will reduce code replication and make data consistent over different websites; threefold.io, dashboardalso we are caching the data for one day, if any errors happen while updating it, we are returning the outdated data with flag
outdated
if there is no cached data too or if any error happen while reading it, we return a dummy data,Changes
the actual changes on the default nginx.conf is :
/summary
endpoint to server in `default.confRelated Issues
Checklist