0

I have a solution I've been developing locally that contains three projects. The structure is as follows:

My Solution Contains:

  • Auth (project)

  • Api (project)

  • Web (project)

I'm using IIS to map the projects to the following virtual directories:

  • Auth -> /Auth
  • Api -> /Api
  • Web -> /

The Web project is the entry point to the application and contains all of my static files (css, js, html). It contains an angularjs app, and an index.cshtml for bundling support.

I've opened a new Azure account and am trying to deploy this solution to a single Web application. I would like to use continuous deployment by connecting to my git repo. Is this even possible?

I've attached my repo, but deployment only seems to grab the Auth project and completely ignore the other two.

Do I have to configure the projects in seperate Web Apps? (highly undesirable). All projects use the same DB. If they have to be in their own Web Apps, is it possible for them to use the same domain name and map them to my virtual directories listed above?

Brandon Smith
  • 1,197
  • 9
  • 13
  • It looks like I'll have to create three separate Web Applications and in app settings point each to a different csproj. How do I get them to talk though? I'll need them mapped as my virtual directories were. – Brandon Smith May 13 '15 at 02:45
  • If you have multiple projects in a solution you must tell the compiler/deployer in Azure what project you are deploying. If you have your source code in github or bitbucket you can just add this settings in the config for your site. Read more about it here: http://www.devtrends.co.uk/blog/azure-web-sites-git-deploy-for-multiple-project-solutions – Henrik Fransas May 13 '15 at 06:41
  • Here is a example of a more simple solution (were not able to edit my last comment) http://stackoverflow.com/questions/13632955/azure-websites-deploy-specific-web-project – Henrik Fransas May 13 '15 at 06:50
  • @HenrikFransas - That is for deploying to different web apps which is exactly what I was hoping to avoid. – Brandon Smith May 13 '15 at 11:27
  • Ok, sorry for the misunderstanding. You could then write you own logic (if you are using git). The technique that are used by Azure are KUDU and you can extend that logic yourself. Read more here about it: https://github.com/projectkudu/kudu/wiki/Deployment-hooks https://github.com/projectkudu/kudu/wiki/Customizing-deployments – Henrik Fransas May 13 '15 at 13:36

1 Answers1

1

There is no out of the box support for your scenario but you can follow these steps to get the configuration you want:

  1. Create a custom deployment script that will build all of your projects and deploy them to separate directories (for example wwwroot, wwroot_auth and wwwroot_api), documentation on this can be found here - http://blog.amitapple.com/post/38417491924/azurewebsitecustomdeploymentpart1/ (3 parts).

  2. Using applicationhost.xdt transformation file create the virtual directories, documentation on this: https://github.com/projectkudu/kudu/wiki/Xdt-transform-samples

Alternative to 2. is to create the virtual directories from the management portal (under the CONFIGURE tab).

Note: The easiest solution is to use separate Web Apps for each project, this way you have more out of the box support.

Amit Apple
  • 9,034
  • 41
  • 50