Expand the site on an azure background

I have an ASPNET mvc project using both Nuget and Bower for dependencies. Now I need to either start the trigger to install the components during deployment, or as a backup of packages by enabling them in my .gitignore. Of course, I would not want to include those that were in the repo, and just installed them during deployment, as with nuget packages. I tried following this guide http://gregtrowbridge.com/deploying-a-bower-dependent-node-app-on-windows-azure/ , but still nothing happens. Therefore any help is appreciated :)

Best wishes

+8
bower deployment azure azure-web-sites
source share
3 answers

All Azure work sites have a pre-installed base and should be in your way.

All you have to do is add a custom deployment script that would bower install Here is a sample repo for an ASP.NET MVC site that uses conversation

Basically make sure bower.json exists and references your csproj

  <Content Include="bower.json" /> 

Then load your own deployment script. if you go to https://<yourSiteName>.scm.azurewebsites.net , then click Tools -> Download custom deployment script or just download it from D:\home\deployment\tools and then check it in the root of your repo, like here , basically there will be 2 deploy.cmd and .deployment

this is the deployment logic, add a step to restore bower in it as here after the last step there

 :: 4. Bower Install if EXIST "%DEPLOYMENT_TARGET%\bower.json" ( pushd "%DEPLOYMENT_TARGET%" call :ExecuteCmd bower install IF !ERRORLEVEL! NEQ 0 goto error popd ) 
+13
source share

One of the important additions to the above is that you must also click the immutable .deployment file and change the .cmd file to the deployment root for Azure in order to subsequently copy / execute your .cmd corrections. Otherwise, it will restore the default .cmd

0
source share

You can use the console function of the Azure web application to run commands. Even if the console has access to limited functions, you can still install beam components using the command:

 bower install 

The console setting is listed in the web application deployment section. You can refer to the screen below for reference.

Screen 1

Prerequisites:

  • Do not publish the bowerComponents folder in the web application.
  • Include the bower.json file, including all dependencies.

Hope this helps.

0
source share

All Articles