Skip to content

Commit e4312fd

Browse files
committed
fixed shell deployment script
1 parent 439d320 commit e4312fd

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

azure-deploy.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,34 @@
33
set -euo pipefail
44

55
# Make sure these values are correct for your environment
6-
resourceGroup="azure-sql-db-python-rest-api"
7-
appName="azure-sql-db-python-rest-api"
6+
resourceGroup="dm-api-01"
7+
appName="dm-api-01"
88
location="WestUS2"
99

1010
# Change this if you are using your own github repository
1111
gitSource="https://github.com/Azure-Samples/azure-sql-db-python-rest-api.git"
1212

13+
# Make sure connection string variable is set
14+
15+
if [[ -z "${SQLAZURECONNSTR_WWIF:-}" ]]; then
16+
echo "Plase export Azure SQL connection string:";
17+
echo "export SQLAZURECONNSTR_WWIF=\"your-connection-string-here\"";
18+
exit 1;
19+
fi
20+
21+
echo "Creating Resource Group...";
1322
az group create \
1423
-n $resourceGroup \
1524
-l $location
1625

26+
echo "Creating Application Service Plan...";
1727
az appservice plan create \
1828
-g $resourceGroup \
1929
-n "linux-plan" \
2030
--sku B1 \
2131
--is-linux
2232

33+
echo "Creating Web Application...";
2334
az webapp create \
2435
-g $resourceGroup \
2536
-n $appName \
@@ -28,8 +39,9 @@ az webapp create \
2839
--deployment-source-url $gitSource \
2940
--deployment-source-branch master
3041

42+
echo "Configuring Connection String...";
3143
az webapp config connection-string set \
3244
-g $resourceGroup \
3345
-n $appName \
34-
--settings WWIF=$SQLAZURECONNSTR_WWIF \
46+
--settings WWIF="$SQLAZURECONNSTR_WWIF" \
3547
--connection-string-type=SQLAzure

0 commit comments

Comments
 (0)