This is a follow up to my first post on running Node.js in Azure App Service, this time I want to cover the newly GA’ed App Service on Linux.
In most regards App Service on Linux works the same way as the regular (Windows) App Service, is has the same core features and operate mostly the same.
The main difference (aside from the blindingly obvious; the host OS is Linux!) is App Service on Linux uses Docker containers to host & run your webapp. This provides a heap of advantages when it comes to deploying your app, and IMO containers also make an ideal way to run Node based apps. There’s many lightweight and robust Docker images you can use, the Alpine Linux image notably weighing in at a tiny 23MB.
You have two fundamental ways of working with App Service on Linux:
- Use one of the provided application stack images
Referred to as “App Service on Linux” or “Linux Web Apps”
- Run a custom image, either one of your own Docker images or one pulled from Dockerhub.
Referred to as “Web App for Containers”
We’ll cover using both approaches to host and run Node apps