Deploy a react app created using ASP.NEt core template in to different environments

Hi,

I created a React app from the ASP.net core 2.2 template and created a continuous delivery pipeline in Teamcity which deploys the app “Development” environment. I have 3 build steps in my Teamcity build configuration,

  1. dotnet publish
  2. Octopack package
  3. Deploy

Running dotnet publish builds the react app in production mode (basically runs npm build as part of it). I have some environment-specific variables in reactjs code. Basically different variables for Development, Staging and Production. So, my question is how can I change these environment variables when deploying the app to different environments in octopus?

Hi @bonyfus

Thanks for getting in touch!

As it turns out this question has come up a few times so one of our developers wrote a fairly comprehensive blog post outlining a few options that might be suitable here. If you can please have a read of that post and let me know if you have any follow up questions that would be greatly appreciated.

Regards,
Alex

Hi @Alex.Rolley,

I will go through it.

Thanks,

Bon

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.