Artem, we set some env vars on the frontend in <ng...
# dev-frontend
d
Artem, we set some env vars on the frontend in nginx today. For cloud, we are looking at getting rid of nginx entirely and hoping to just serve the webapp as a static page. Do you know if this is possible/easy to do?
a
Well the reason why we set env variables this way - because we build bundle once. So if we want env variables to be picked correctly on docker-compose up, every time we need to rebuild webapp again and we do not want to do it. The only possible way was either replace some part of index.html ( or .js code ) on the fly on nginx layer, but much easier was to just inject small additional script and pick values from it. Probably for cloud we do not want to set them on the fly, so we can get rid of them, just set some env variables during build and deploy.
d
Setting env var on the build and deploying sounds good to me! Will that require any frontend changes? This seems to be modifying the javascript
window
object