-
Notifications
You must be signed in to change notification settings - Fork 7
Use Node.js CLI to update env vars during start time #334
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
|
this should solve security issue https://github.com/Visual-Regression-Tracker/frontend/pull/197/files |
| FROM nginx:1.25-alpine3.18-slim | ||
|
|
||
| # Install Node.js LTS version needed for env variable generation | ||
| RUN apk add --update nodejs |
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 guess this part is the reason for image size increase
https://github.com/Visual-Regression-Tracker/frontend/releases/tag/v5.0.0-rc4
https://hub.docker.com/repository/registry-1.docker.io/visualregressiontracker/ui/tags?page=1&ordering=last_updated

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.
Yes, it is the smaller possible image that has nodejs
|
SonarCloud Quality Gate failed.
|
| COPY .env . | ||
|
|
||
| # Start Nginx server with override ENV variables script | ||
| CMD ["/bin/sh", "-c", "node /usr/share/nginx/html/generate-env-browser.mjs && nginx -g \"daemon off;\""] |
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.












Another option for #414
to answer #332