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.

2
  • Maybe this helps: stackoverflow.com/questions/41733660/… Commented Apr 26, 2019 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 Commented Apr 26, 2019 at 18:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.