Forum Discussion
daniyal-zafar-cowlar
Aug 24, 2023Copper Contributor
Static Website Deployement to Azure Storage Account with Zero-Downtime
Hi, I've deployed my Static Website to Azure Storage Account.
In the GitLab CI/CD pipeline when I push the new files it adds up to the existing files/folders and using --overwrite=true it replaces the existing files. To avoid extra previous files and implement zero downtime, I've thought of the following workaround:
1. Initial Setup
In the GitLab CI/CD pipeline when I push the new files it adds up to the existing files/folders and using --overwrite=true it replaces the existing files. To avoid extra previous files and implement zero downtime, I've thought of the following workaround:
1. Initial Setup
- Create a new container temp-web along with $web container
- Push the files to both containers
2. Steps for the pipeline
- Perform a directory swap to the temp-web container
- Delete all files from the $web container
- Push new files to $web container
- Perform a directory swap to $web container
- Delete all files from the temp-web container
- Push new files to the temp-web container
How to update the Azure Storage container for a static website instead of $web to temp-web?
There is a post that can provide you with some idea:
Deploying a static website to Azure Storage using Azure DevOps | by Matthew Leak | Medium