Skip to content

Commit 02ac39d

Browse files
committed
updated deployment
1 parent 1580d03 commit 02ac39d

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
MSSQL='Server=.database.windows.net;Initial Catalog=;Persist Security Info=False;User ID=session_recommender_app;Password=unEno!h5!&*KP420xds&@P901afb$^M;MultipleActiveResultSets=False;Encrypt=True;Connection Timeout=30;'
22
OPENAI_URL='https://.openai.azure.com'
33
OPENAI_KEY=''
4+
OPENAI_MODEL='text-embedding-ada-002'

database/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ static int Main(string[] args)
1919
var connectionString = Env.GetString("MSSQL");
2020

2121
if (string.IsNullOrEmpty(connectionString)) {
22-
Console.WriteLine("ERROR: 'ConnectionString' enviroment variable not set or empty.");
22+
Console.WriteLine("ERROR: 'MSSQL' enviroment variable not set or empty.");
2323
Console.WriteLine("You can create an .env file in parent folder that sets the 'MSSQL' environment variable; then run this app again.");
2424
return 1;
2525
}
@@ -41,6 +41,7 @@ static int Main(string[] args)
4141
Dictionary<string, string> variables = new() {
4242
{"OPENAI_URL", Env.GetString("OPENAI_URL")},
4343
{"OPENAI_KEY", Env.GetString("OPENAI_KEY")}
44+
{"OPENAI_MODEL", Env.GetString("OPENAI_MODEL")}
4445
};
4546

4647
Console.WriteLine("Starting deployment...");

infra/app/sqlserver.bicep

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ resource createDBScript2 'Microsoft.Resources/deploymentScripts@2023-08-01' = {
102102
secureValue: appUserPassword
103103
}
104104
]
105-
scriptContent: loadTextContent('../../database/setup-database.ps1')
106105
}
107106
}
108107

infra/main.bicep

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ param logAnalyticsName string = ''
4545
@description('Flag to Use keyvault to store and use keys')
4646
param useKeyVault bool = true
4747

48+
param myTags object = {}
49+
4850
var abbrs = loadJsonContent('./abbreviations.json')
4951
var resourceToken = toLower(uniqueString(subscription().id, environmentName, location))
50-
var tags = { 'azd-env-name': environmentName }
52+
var tags = union({ 'azd-env-name': environmentName }, myTags)
5153
var rgName = 'rg-${environmentName}'
5254

5355
// Organize resources in a resource group
@@ -126,7 +128,7 @@ module hostingPlan 'core/host/appserviceplan.bicep' = {
126128
location: location
127129
name: !empty(hostingPlanName) ? hostingPlanName : '${abbrs.webServerFarms}${resourceToken}'
128130
sku: {
129-
name: 'EP1'
131+
name: 'B1'
130132
}
131133
kind: 'linux'
132134
}

infra/main.parameters.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
"value": "$(secretOrRandomPassword ${AZURE_KEY_VAULT_NAME} appUserPassword)"
1919
},
2020
"useKeyVault": {
21-
"value": "${USE_KEY_VAULT=true}"
21+
"value": "${USE_KEY_VAULT=false}"
22+
},
23+
"myTags": {
24+
"value": {}
2225
}
2326
}
2427
}

0 commit comments

Comments
 (0)