Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy a simple static micro site on Microsoft Azure

Tags:

I plan to move all my websites from my own baremetal server to Microsoft Azure. To get things started I want to do a POC and deploy a very simple static microsite - a single html page with some css/img/js resources.

How does one go deploy a simple static website? I can see options for simple CMS type sites, but nothing for the most basic of sites.

like image 719
Pectus Excavatum Avatar asked Jul 27 '15 12:07

Pectus Excavatum


People also ask

How do I deploy a static website on Azure?

Configure static website hostingOpen the Azure portal in your web browser. Locate your storage account and display the account overview. Select Static website to display the configuration page for static websites. Select Enabled to enable static website hosting for the storage account.

How do I make a simple Azure website?

Create a Website in Azure Management PortalStep 1 − Login to your management portal. Step 2 − Click 'New' at the left bottom corner of the screen → Compute → Web Apps → Quick Create. Step 3 − Enter the details as shown in the picture above and click 'Create Web App'.

Can I deploy my website in Azure?

Web apps in Azure allow you to publish and manage your website easily without having to work with the underlying servers, storage, or network assets.

How do I deploy an azure static web app?

Azure Static Web Apps publishes a website by building an app from a code repository. In this quickstart, you deploy an application to Azure Static Web apps using the Visual Studio Code extension. If you don't have an Azure subscription, create a free trial account.

Can I use Azure storage for a static site?

Actually, yes. Azure Storage is specifically designed to serve files as quickly as possible. Static sites are just files. And because God loves you and wants you to be happy, there is VS Code. And because Microsoft loves you, there is an Azure Storage extension. Once it’s installed, you create a storage account.

How do I create a static web app in Visual Studio?

Under the Static Web Apps label, select the plus sign. The Azure Static Web Apps Visual Studio Code extension streamlines the creating process by using a series of default values. If you want to have fine-grained control of the creation process, open the command palette and select Azure Static Web Apps: Create Static Web App...

How do I create a website on azure?

You can do create a website on Azure in 3 simple steps. Step 1 : Select app type (Select Web App) Step 2 : Select template (Select which ever you are comfortable with) Step 3 : Work with your app After you have created the Web apps there are multiple ways to work with the site you have created,


2 Answers

If you start with a simple Web App (the best option IMHO for a static website), you can opt to create the site without deploying one of the pre-defined web app templates. This will allow you to publish your own content files via either FTP or Git.

A basic walk through of this is available online here. There's also multiple additional links off of that one that can provide additional information about running web apps in Azure.

If you use the "free" (F1) service plan, you'll be able to host up to 10 web sites per region at that level. Just keep in mind the resource/usage limits associated with each service plan.

like image 45
BrentDaCodeMonkey Avatar answered Oct 10 '22 03:10

BrentDaCodeMonkey


While there are several options as mentioned Brents answer (and comments), I find one simple option as easiest.

  1. Create a website from the Azure portal.
  2. Go to: https://{sitename}.scm.azurewebsites.net/DebugConsole
  3. Navigate to: site/wwwroot
  4. Drag drop your files (html/js/css/...).

Done

(browse to http://{sitename}.azurewebsites.net/ to see your site).

Note: You can also edit your files from this view.

like image 77
Amit Apple Avatar answered Oct 10 '22 03:10

Amit Apple