locked
Deploy single Visual Studio Project to multiple Azure Sites RRS feed

  • Question

  • User-2033319731 posted

    I have a visual studio MVC app in Visual Studio Online which gets automatically built and deployed to an azure website each time I check in changes. The site has a corresponding database in azure.

    I would like to create a second azure website that runs on the same bits with a different database and possibly some different configuration (e.g., a different header and footer, different permissions, etc.).

    Is it possible to deploy a single visual studio 2015 project to multiple azure websites using continuous integration? Is there a tool/feature I should be looking for to accomplish this?

    Friday, December 30, 2016 6:15 PM

All replies

  • User541108374 posted

    Hi,

    depending on what you want you could make different deployment settings in your Visual Studio but as you mention CI I think it's not what you're after.

    What you could do is make use of deployment slots in Web Apps https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-staged-publishing and swap after a deployment (staging to production for example).

    I would like to create a second azure website that runs on the same bits with a different database and possibly some different configuration (e.g., a different header and footer, different permissions, etc.).

    This can also be interpreted as something else: multitenancy. In this case you use the same database with the same codebase but show different things / sites for different users. A good example would be SharePoint online which is the same thing but every company / person can set up a SharePoint site and have it look different, contain different information, ...

    Grz, Kris.

    Monday, January 2, 2017 10:22 AM
  • User-2033319731 posted

    I'm using deployment slots for staging/production already.  Is that also used for having different instances of a site with different users? I'd also like the two sites to have very slightly different config. E.g., I'd like the two sites to have a different logo.

    I'm trying to avoid a multitenant solution as that would require redesigning a lot of my site/database.

    Monday, January 2, 2017 4:17 PM
  • User541108374 posted

    Hi,

    I'd like the two sites to have a different logo

    Well, you could deploy your code to different web apps in Azure and make use of the settings of that web app to inject different config settings for example. If it's the same code base you could try it like that.

    I'm trying to avoid a multitenant solution as that would require redesigning a lot of my site/database.

    I know the pain as I'll have to go through it myself within 2 months. But still it's better than having 60 deployments with 60 databases and having to maintain them with different versions. And likely that 60 will increase rapidly. I told the business it's better to invest time upfront to come up with a good architecture for the multitenant solution instead of going through deployment hell (which is done by another team).

    Grz, Kris.

    Tuesday, January 3, 2017 7:06 AM