Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudymax/cloudydevdotnet
My personal webpage
https://github.com/cloudymax/cloudydevdotnet
Last synced: 27 days ago
JSON representation
My personal webpage
- Host: GitHub
- URL: https://github.com/cloudymax/cloudydevdotnet
- Owner: cloudymax
- Created: 2021-11-24T12:19:24.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-17T09:39:26.000Z (about 1 year ago)
- Last Synced: 2024-10-04T21:46:33.357Z (about 2 months ago)
- Homepage: https://www.cloudydev.net/
- Size: 11.5 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Static website hosting for ~$0.05 /month
How I host my personal site in an Azure Storage Blob.
## 1. Install the Azure CLI
```zsh
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
```## 2. Log In
```zsh
az login
```## 3. List Subscriptions
```zsh
❯ az account list -o table
Name CloudName SubscriptionId State IsDefault
------------- ----------- ------------------------------------ ------- -----------
cloudydev.net AzureCloud d520e0d1-8ce2-4bf3-bb06-443ee372cfec Enabled True
```
```## 4. Export variables and keep things DRY
```bash
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"
```## 5. Set subscription
```zsh
az account set --subscription="${SUBSCRIPTION}"
```## 6. Create a resource group
```zsh
az group create \
-l="${LOCATION}" \
-n="${RG_NAME}"
```## 7. Create storage account
- [Reference](https://docs.microsoft.com/en-us/rest/api/storagerp/srp_sku_types)
```zsh
az storage account create \
--name="${STORAGE_NAME}" \
--resource-group="${RG_NAME}" \
--location="${LOCATION}" \
--sku="${STORAGE_SKU}" \
--kind="${KIND}"
```## 8. Enable static website hosting
```zsh
az storage blob service-properties update \
--account-name="${STORAGE_NAME}" \
--static-website \
--404-document="${ERROR_DOC}" \
--index-document="${INDEX_DOC}" \
--auth-mode login
```## 9. Upload Files
```zsh
az storage blob upload-batch \
-s "${SITE_ROOT_FOLDER}" \
-d '$web' \
--account-name="${STORAGE_NAME}"
```## 10. Get the URL
```zsh
az storage account show \
-n "${STORAGE_NAME}" \
-g "${RG_NAME}" \
--query "primaryEndpoints.web" \
--output tsv
# https://cloudydevdata.z6.web.core.windows.net/
```