How I host my personal site in an Azure Storage Blob.
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az login
❯ az account list -o table
Name CloudName SubscriptionId State IsDefault
------------- ----------- ------------------------------------ ------- -----------
cloudydev.net AzureCloud d520e0d1-8ce2-4bf3-bb06-443ee372cfec Enabled True
```
export KIND="StorageV2"
export LOCATION="westeurope"
export SUBSCRIPTION="cloudydev.net"
export RG_NAME="cloudydev-docs"
export STORAGE_NAME="cloudydevdata"
export STORAGE_SKU="Standard_RAGRS"
export ERROR_DOC="index.html"
export INDEX_DOC="index.html"
export SITE_ROOT_FOLDER="site"
az account set --subscription="${SUBSCRIPTION}"
az group create \
-l="${LOCATION}" \
-n="${RG_NAME}"
az storage account create \
--name="${STORAGE_NAME}" \
--resource-group="${RG_NAME}" \
--location="${LOCATION}" \
--sku="${STORAGE_SKU}" \
--kind="${KIND}"
az storage blob service-properties update \
--account-name="${STORAGE_NAME}" \
--static-website \
--404-document="${ERROR_DOC}" \
--index-document="${INDEX_DOC}" \
--auth-mode login
az storage blob upload-batch \
-s "${SITE_ROOT_FOLDER}" \
-d '$web' \
--account-name="${STORAGE_NAME}"
az storage account show \
-n "${STORAGE_NAME}" \
-g "${RG_NAME}" \
--query "primaryEndpoints.web" \
--output tsv
# https://cloudydevdata.z6.web.core.windows.net/