Runtime environment variables with React,Kubernetes and Apache

During my career happened to face this issue: how to build once a react-based application and run it through different environments (staging, qa, dev, production) with a single docker image? Usually to change a variable (for example a URL) you need to rebuild the application and redeploy on the target environment; as you may know, this isn’t very flexible and it may require other actions such as CDN cache clear, coordinate between teams etc....

September 13, 2021 · 4 min · Justin