Simple Shell script to upload files to Azure Blob Storage and generate its Azure CDN URL.
- Clone this repository
git clone https://github.com/godofgeeks23/azure-cdn-uploader.git
- Install the Azcopy CLI tool
Download the latest version of Azcopy CLI tool from the official website. Extract the tarball and copy the binary to /usr/local/bin/
.
wget https://azcopyvnext.azureedge.net/releases/release-10.24.0-20240326/azcopy_linux_amd64_10.24.0.tar.gz
tar -xvf azcopy_linux_amd64_10.24.0.tar.gz
sudo cp azcopy_linux_amd64_10.24.0/azcopy /usr/local/bin/
azcopy --version
- Initialize the environment variables - rename
sample.env
to.env
and fill in the values
cp sample.env .env
- Run the script
bash uploader.sh
The script will upload the files to Azure Blob Storage and generate the Azure CDN URL.
For more details on how to setup Azure Blob Storage and Azure CDN, refer to the official documentation.