Skip to content

Commit 87eab6d

Browse files
committed
added deployment sample
1 parent 4c8d40f commit 87eab6d

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

azure-deploy.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# Make sure these values are correct for your environment
6+
resourceGroup="azure-sql-db-dotnet-rest-api"
7+
appName="azure-sql-db-dotnet-rest-api"
8+
location="WestUS2"
9+
10+
# Change this if you are using your own github repository
11+
gitSource="https://github.com/yorek/azure-sql-db-dotnet-rest-api.git"
12+
13+
az group create \
14+
-n $resourceGroup \
15+
-l $location
16+
17+
az appservice plan create \
18+
-g $resourceGroup \
19+
-n "linux-plan" \
20+
--sku B1 \
21+
--is-linux
22+
23+
az webapp create \
24+
-g $resourceGroup \
25+
-n $appName \
26+
--plan "linux-plan" \
27+
--runtime "DOTNETCORE|3.0" \
28+
--deployment-source-url $gitSource \
29+
--deployment-source-branch master
30+
31+
az webapp config connection-string set \
32+
-g $resourceGroup \
33+
-n $appName \
34+
--settings DefaultConnection=$DefaultConnection \
35+
--connection-string-type=SQLAzure

0 commit comments

Comments
 (0)