forked from PREreview/rapid-prereview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy-app.sh
executable file
·30 lines (17 loc) · 1.36 KB
/
deploy-app.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
## Deploy to https://rapid-prereview.azurewebsites.net/
./deploy-env.private.sh app
## See https://docs.microsoft.com/en-us/azure/app-service/deploy-zip
zip -r app.zip *.json *.js dist/* src/* public/* views/* scripts/* test/* node_modules/*
## See https://docs.microsoft.com/en-us/azure/app-service/containers/configure-language-nodejs
## See https://github.com/projectkudu/kudu/wiki/Deploying-from-a-zip-file-or-url#issues-and-investigation
az webapp config appsettings set --resource-group "rapid-prereview" --name "rapid-prereview" --settings SCM_ZIPDEPLOY_DONOT_PRESERVE_FILETIME=1
## disabled as npm install fails sometimes see https://github.com/projectkudu/kudu/issues/2946
## az webapp config appsettings set --resource-group "rapid-prereview" --name "rapid-prereview" --settings SCM_DO_BUILD_DURING_DEPLOYMENT=true
## https://docs.microsoft.com/en-us/azure/app-service/containers/configure-language-nodejs#run-with-pm2
# Azure App service will start the file with pm2
az webapp config set --resource-group "rapid-prereview" --name "rapid-prereview" --startup-file "./dist/server.js"
# to use without pm2:
# az webapp config set --resource-group "rapid-prereview" --name "rapid-prereview" --startup-file "npm run start:app-prod"
az webapp deployment source config-zip --resource-group "rapid-prereview" --name "rapid-prereview" --src app.zip
rm app.zip