Composer & Azure Web Apps

Composer & Azure Web Apps

I’m working on non-dotNet related technology more and more and to be honest, it’s interesting to see how other environments are dealing with similar problems. Now as you can imagine, running different technologies within Azure requires some additional planning. For example, the usage of the dependency manager composer.

Composer & Azure Web Apps

To keep things short, I’m working / experimenting with Laravel (something every ASP.NET MVC should just play with, even if it’s only a couple of hours) hosted within a Azure Web App. For the deployment and maintaining the environment, I’m depending on Composer among other tooling. Php is enabled by default (v5.4) for every Web App instance, but not including Composer.

Installing Composer

Fortunately, the steps required are very simple;

Step 1 Open the Azure Management Portal ( and locate your Azure Web App.

Step 2 Within the management blade you will find a Tools button, clicking this button will open the Tools blade (as somewhat expected)
composer & Azure 1

Step 3 Within the Tools blade, locate the section called Develop. Within this section Extensions.

composer and Azure 2

Step 4 After opening the Extensions blade you will see a button called Add which will open the Add extension wizard.

php Composer and Azure Web App 3

Step 5 Within the wizard, search for Composer and accept the legal terms if you agree.

Note: I’m not sure if It’s required to restart the application at this point, but I did it anyways. (Restart can be found within the main application blade)

Running composer commands

To run composer commands, open the Console located in Tools ➔ Console or perhaps even better, open your kudu environment (Tools ➔ Kudu) .

composer command line in azure

Your kudu environment also allows you to install Composer as can be seen within the image below. The outcome will be the same, so it’s just a matter of preference.

Azure kudu composer installation

Something about Automation

If you would like to have extensions, not only composer, available by default. Make sure to include Composer as a child resource type (Microsoft.Web/sites/extensions) within Microsoft.Web/sites of your Azure Resource Manager deployment templates.

Azure released a template export feature which simplifies the creation of creating resource templates. More information can be found here “Announcing template export feature in Azure Resource Manager”.

Post Navigation