Created
July 30, 2021 12:42
-
-
Save gagarine/250be8548aa5785fe45061cfb702b72c to your computer and use it in GitHub Desktop.
Deploy local nodejs project on Azure App Service using Azure CLI and zip package
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo 'Cleanup...' | |
rm MyProject-package.zip | |
rm -r node_modules | |
echo 'Build...' | |
npm install | |
npm run build | |
zip -r MyProject-package.zip . -x '.git/*' -x 'src/*' -x '.idea/*' -x '.env' | |
echo 'Deploy...' | |
az webapp deployment source config-zip --resource-group MyGroup --name MyProject --src MyProject-package.zip | |
echo 'Warmup Request' | |
curl --head https://MyProject.azurewebsites.net/ | |
echo 'Get Log Tail' | |
az webapp log tail --resource-group MyGroup --name MyProject |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This build locally a zip and push it to Azure.