Azure Static Deployment with App Service
Last Updated: September 10, 2024
Website Deployment via App Service
Section titled “Website Deployment via App Service”In this guide, we will deploy a static website using Azure App Service. Azure App Service is a fully managed platform for building, deploying, and scaling web apps. It provides a rich set of features, including continuous deployment from GitHub, Bitbucket, and Azure DevOps, custom domains, SSL certificates, and scaling.
Steps to Deploy a Static Website on Azure App Service
Section titled “Steps to Deploy a Static Website on Azure App Service”There are a few preliminary steps to get things underway. The official Learn guide offers a number of options for an IDE to use for this project. For this guide, we will use Visual Studio Code.
Step 1: Install VS Code And Required Extensions
Section titled “Step 1: Install VS Code And Required Extensions”I’ll keep this section pretty loose as it is not the intended purpose of this guide. However, I will provide a brief overview of the steps to install Visual Studio Code and the required extensions.
- Install Visual Studio Code from here.
- You’ll need to install the Azure App Service extension. If you have any goals of working with Azure in VS Code in a greater capacity, it may be worthwhile to install the Azure Tools extension pack which includes 8 different Azure extensions.
Step 2: Create a Web App Resource in Azure
Section titled “Step 2: Create a Web App Resource in Azure”-
Open the Azure Portal and click on the
Create a resourcebutton. -
A bunch of stuff will pop up here – look in the left-hand menu for
Weband then selectWeb App. -
You’ll be met with a set of fields to fill out. You’ll need to create a new resource group, give your web app a name, and select a region. You can leave the rest of the settings as default. Here is an example key:value pairing of what it might look like using my own information. Note that the app that I’m publishing is a Docusauraus site, so my runtime stack is Node XX LTS.:
Subscription: Azure subscription 1Resource Group: Home-Lab-EducationInstance Details:- Name: BG-Lab-Docs- Publish: Code- Runtime Stack: Node 14 LTS- Operating System: Linux- Region: Canada EastPricing Plans- Linux Plan (East US): (New) BG-Lab # note that this is a new plan that I created- Pricing Plan: Free F1 (Shared infrastructure)
-
You may find that the region you select is not available for the pricing plan you’ve selected. If this is the case, you’ll need to select a different region or a different pricing plan. I had to switch mine from US East to Canada East. No worries as it’s basically exactly where I’m located.
-
Click the
Review + Createbutton and then theCreatebutton. You’ll see aDeployment in progressmessage. With some patience, you’ll soon see a review of the deployment and aGo to resourcebutton. Click it. 6.Note that the provisioning / deployment process can take a while and you’ll probably see some loading elements - hang tight for a few minutes in this case and the properties should populate. 7 On the top right of the properties list, you’ll see a default domain consisting of some ludicrously long string of characters followed by.azurewebsites.net. This is the URL that you can use to access your site. You can also add a custom domain if you have one. We’ll cover that in a later section. -
You’ve chosen the free tier, so hang tight again after clicking the domain as it takes a while to load.