1

I have an Angular 7 web app which is deployed through Microsoft's Team Foundation Server using a multi-stage Docker build to be served by NGINX.

The problem is I would like to use some form of environment variable passed to the image during the TFS release definition which the app would use as it's version number to be displayed in the browser.

I know runtime environment variables are not supported by Angular, and I created a workaround for environment specific API routes using a JSON config file but this will not work in conjunction with TFS for this purpose.

Any and all suggestions are appreciated.

cannerwagon
  • 41
  • 1
  • 5
  • Maybe this helps: https://stackoverflow.com/questions/41733660/how-to-insert-a-build-number-or-timestamp-at-build-time-in-angularcli – Erbsenkoenig Apr 26 '19 at 18:24
  • @Erbsenkoenig this is similar to how I handled the API routes.. not really runtime though. I have an idea involving docker secrets; will post if successful – cannerwagon Apr 26 '19 at 18:52

0 Answers0