How to deploy multiple projects in a single Web App on Azur Portal?

SANTOSH SHELKE 45 Reputation points
2023-06-01T12:21:56.2766667+00:00

How to deploy multiple projects in a single Web App on Azur Portal?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,695 questions
{count} vote

Accepted answer
  1. brtrach-MSFT 14,476 Reputation points Microsoft Employee
    2023-06-02T02:28:07.62+00:00

    Sure, here are the step-by-step instructions to deploy multiple projects to a single Azure Web App via CI/CD:

    1. Create an Azure DevOps project and connect it to your Azure subscription.
    2. Create a new build pipeline in Azure DevOps that builds your multiple projects. You can use the Visual Studio Build task to build your projects. You can also use the .NET Core task if you are using .NET Core.
    3. Create a new release pipeline in Azure DevOps that deploys your multiple projects to your Web App. You can use the Azure App Service Deploy task to deploy your projects. You will need to configure the task to deploy each project to a different virtual directory in your Web App. For example, you can deploy Project A to the root of your Web App and Project B to a virtual directory called "/projectb".
    4. Configure the release pipeline to deploy each project to a different virtual directory in your Web App. You can do this by setting the "Virtual Application" field in the Azure App Service Deploy task.
    5. Create a new Web App in the Azure portal and note down its name.
    6. In the Azure portal, go to the "Deployment Center" of your Web App and select "Azure DevOps" as the source.
    7. Select your Azure DevOps project and the build pipeline you created in step 2.
    8. Select the release pipeline you created in step 3 and configure it to deploy to your Web App.
    9. Save the changes and trigger a build and release by committing changes to your source code repository.

    Here are some additional details for each step:

    1. To create an Azure DevOps project, go to the Azure DevOps website and sign in with your Microsoft account. Then, create a new project and connect it to your Azure subscription.
    2. To create a new build pipeline, go to your Azure DevOps project and select "Pipelines" > "Builds" > "New pipeline". Then, select your source code repository and configure the build pipeline to build your multiple projects.
    3. To create a new release pipeline, go to your Azure DevOps project and select "Pipelines" > "Releases" > "New pipeline". Then, select your build pipeline as the source and configure the release pipeline to deploy your multiple projects to your Web App.
    4. To configure the release pipeline to deploy each project to a different virtual directory in your Web App, add a new stage to the release pipeline for each project you want to deploy. Then, add an Azure App Service Deploy task to each stage and configure the task to deploy the project to a different virtual directory in your Web App. For example, you can deploy Project A to the root of your Web App and Project B to a virtual directory called "/projectb".
    5. To create a new Web App in the Azure portal, go to the Azure portal and select "Create a resource" > "Web App". Then, configure the Web App with a unique name and select the appropriate subscription, resource group, and operating system.
    6. To access the "Deployment Center" of your Web App, go to the Web App in the Azure portal and select "Deployment Center" from the left-hand menu.
    7. To select your Azure DevOps project and build pipeline, select "Azure DevOps" as the source in the "Deployment Center" and follow the prompts to connect to your Azure DevOps project and select the appropriate build pipeline.
    8. To configure the release pipeline to deploy to your Web App, select the release pipeline you created in step 3 and follow the prompts to configure the pipeline to deploy to your Web App. Make sure to set the "Virtual Application" field in the Azure App Service Deploy task to the appropriate virtual directory for each project.
    9. To trigger a build and release, commit changes to your source code repository. The pipeline will automatically build and deploy your changes to your Web App. You can monitor the progress of the build and release in the Azure DevOps portal.

    If you have further questions or concerns, please reply to this message so we can assist you further.

    Note: that part of this answer was generated using Open AI.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Prakash Rawat 20 Reputation points
    2023-06-01T12:26:03.07+00:00

    Hello Santhosh,

    Web App is like on single IIS instance. if you wanted to deploy multiple web application you can go with App Service model where you can create multiple webapp instances.

    Thanks