Skip to content

Commit 590bfc3

Browse files
author
thomaslrt05
committed
update site for secret
1 parent bafdb31 commit 590bfc3

File tree

6 files changed

+296
-7
lines changed

6 files changed

+296
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
@@ -9,10 +9,10 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Azure.AI.OpenAI" Version="1.0.0-beta.14" />
12-
<PackageReference Include="Azure.Identity" Version="1.10.4" />
12+
<PackageReference Include="Azure.Identity" Version="1.11.2" />
1313
<PackageReference Include="Azure.Storage.Blobs" Version="12.19.1" />
1414
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
15-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
15+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
1616
</ItemGroup>
1717

1818
</Project>

src/API-GenerateConference/Models/IASettings.cs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ public class IASettings
77
public string azure_endpoint { get; set; }
88
public string azure_Key { get; set; }
99
public string dalle_endpoint { get; set; }
10-
1110
public string blob_conference { get; set; }
1211
public string speech_key { get; set; }
1312

src/API-GenerateConference/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
options.AddPolicy("CorsPolicy",
1010
builder =>
1111
{
12-
builder.WithOrigins("http://localhost:5174", "http://localhost:5173", "http://localhost:5175")
12+
builder.WithOrigins("https://wonderful-island-04d9a0e03.5.azurestaticapps.net/")
1313
.AllowAnyHeader()
1414
.AllowAnyMethod();
1515
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"metadata": {
5+
"_dependencyType": "compute.appService.linux"
6+
},
7+
"parameters": {
8+
"resourceGroupName": {
9+
"type": "string",
10+
"defaultValue": "rg-meshInnovateCreate-westeurope-dev-001",
11+
"metadata": {
12+
"description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
13+
}
14+
},
15+
"resourceGroupLocation": {
16+
"type": "string",
17+
"defaultValue": "westeurope",
18+
"metadata": {
19+
"description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support."
20+
}
21+
},
22+
"resourceName": {
23+
"type": "string",
24+
"defaultValue": "API-GenerateConference",
25+
"metadata": {
26+
"description": "Name of the main resource to be created by this template."
27+
}
28+
},
29+
"resourceLocation": {
30+
"type": "string",
31+
"defaultValue": "[parameters('resourceGroupLocation')]",
32+
"metadata": {
33+
"description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
34+
}
35+
}
36+
},
37+
"variables": {
38+
"appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
39+
"appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]"
40+
},
41+
"resources": [
42+
{
43+
"type": "Microsoft.Resources/resourceGroups",
44+
"name": "[parameters('resourceGroupName')]",
45+
"location": "[parameters('resourceGroupLocation')]",
46+
"apiVersion": "2019-10-01"
47+
},
48+
{
49+
"type": "Microsoft.Resources/deployments",
50+
"name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
51+
"resourceGroup": "[parameters('resourceGroupName')]",
52+
"apiVersion": "2019-10-01",
53+
"dependsOn": [
54+
"[parameters('resourceGroupName')]"
55+
],
56+
"properties": {
57+
"mode": "Incremental",
58+
"template": {
59+
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
60+
"contentVersion": "1.0.0.0",
61+
"resources": [
62+
{
63+
"location": "[parameters('resourceLocation')]",
64+
"name": "[parameters('resourceName')]",
65+
"type": "Microsoft.Web/sites",
66+
"apiVersion": "2015-08-01",
67+
"tags": {
68+
"[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty"
69+
},
70+
"dependsOn": [
71+
"[variables('appServicePlan_ResourceId')]"
72+
],
73+
"kind": "app",
74+
"properties": {
75+
"name": "[parameters('resourceName')]",
76+
"kind": "app",
77+
"httpsOnly": true,
78+
"reserved": false,
79+
"serverFarmId": "[variables('appServicePlan_ResourceId')]",
80+
"siteConfig": {
81+
"linuxFxVersion": "DOTNETCORE|2.1"
82+
}
83+
},
84+
"identity": {
85+
"type": "SystemAssigned"
86+
},
87+
"resources": [
88+
{
89+
"name": "appsettings",
90+
"type": "config",
91+
"apiVersion": "2015-08-01",
92+
"dependsOn": [
93+
"[concat('Microsoft.Web/Sites/', parameters('resourceName'))]"
94+
],
95+
"properties": {}
96+
}
97+
]
98+
},
99+
{
100+
"location": "[parameters('resourceLocation')]",
101+
"name": "[variables('appServicePlan_name')]",
102+
"type": "Microsoft.Web/serverFarms",
103+
"apiVersion": "2015-02-01",
104+
"kind": "linux",
105+
"properties": {
106+
"name": "[variables('appServicePlan_name')]",
107+
"sku": "Standard",
108+
"workerSizeId": "0",
109+
"reserved": true
110+
}
111+
}
112+
]
113+
}
114+
}
115+
}
116+
]
117+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"metadata": {
5+
"_dependencyType": "compute.function.linux.appService"
6+
},
7+
"parameters": {
8+
"resourceGroupName": {
9+
"type": "string",
10+
"defaultValue": "rg-meshInnovateCreate-westeurope-dev-001",
11+
"metadata": {
12+
"description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
13+
}
14+
},
15+
"resourceGroupLocation": {
16+
"type": "string",
17+
"defaultValue": "westeurope",
18+
"metadata": {
19+
"description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support."
20+
}
21+
},
22+
"resourceName": {
23+
"type": "string",
24+
"defaultValue": "API-GenerateConference",
25+
"metadata": {
26+
"description": "Name of the main resource to be created by this template."
27+
}
28+
},
29+
"resourceLocation": {
30+
"type": "string",
31+
"defaultValue": "[parameters('resourceGroupLocation')]",
32+
"metadata": {
33+
"description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
34+
}
35+
}
36+
},
37+
"resources": [
38+
{
39+
"type": "Microsoft.Resources/resourceGroups",
40+
"name": "[parameters('resourceGroupName')]",
41+
"location": "[parameters('resourceGroupLocation')]",
42+
"apiVersion": "2019-10-01"
43+
},
44+
{
45+
"type": "Microsoft.Resources/deployments",
46+
"name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
47+
"resourceGroup": "[parameters('resourceGroupName')]",
48+
"apiVersion": "2019-10-01",
49+
"dependsOn": [
50+
"[parameters('resourceGroupName')]"
51+
],
52+
"properties": {
53+
"mode": "Incremental",
54+
"expressionEvaluationOptions": {
55+
"scope": "inner"
56+
},
57+
"parameters": {
58+
"resourceGroupName": {
59+
"value": "[parameters('resourceGroupName')]"
60+
},
61+
"resourceGroupLocation": {
62+
"value": "[parameters('resourceGroupLocation')]"
63+
},
64+
"resourceName": {
65+
"value": "[parameters('resourceName')]"
66+
},
67+
"resourceLocation": {
68+
"value": "[parameters('resourceLocation')]"
69+
}
70+
},
71+
"template": {
72+
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
73+
"contentVersion": "1.0.0.0",
74+
"parameters": {
75+
"resourceGroupName": {
76+
"type": "string"
77+
},
78+
"resourceGroupLocation": {
79+
"type": "string"
80+
},
81+
"resourceName": {
82+
"type": "string"
83+
},
84+
"resourceLocation": {
85+
"type": "string"
86+
}
87+
},
88+
"variables": {
89+
"storage_name": "[toLower(concat('storage', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId))))]",
90+
"appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
91+
"storage_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Storage/storageAccounts/', variables('storage_name'))]",
92+
"appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]",
93+
"function_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/sites/', parameters('resourceName'))]"
94+
},
95+
"resources": [
96+
{
97+
"location": "[parameters('resourceLocation')]",
98+
"name": "[parameters('resourceName')]",
99+
"type": "Microsoft.Web/sites",
100+
"apiVersion": "2015-08-01",
101+
"tags": {
102+
"[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty"
103+
},
104+
"dependsOn": [
105+
"[variables('appServicePlan_ResourceId')]",
106+
"[variables('storage_ResourceId')]"
107+
],
108+
"kind": "functionapp",
109+
"properties": {
110+
"name": "[parameters('resourceName')]",
111+
"kind": "functionapp",
112+
"httpsOnly": true,
113+
"reserved": false,
114+
"serverFarmId": "[variables('appServicePlan_ResourceId')]",
115+
"siteConfig": {
116+
"alwaysOn": true,
117+
"linuxFxVersion": "dotnet|3.1"
118+
}
119+
},
120+
"identity": {
121+
"type": "SystemAssigned"
122+
},
123+
"resources": [
124+
{
125+
"name": "appsettings",
126+
"type": "config",
127+
"apiVersion": "2015-08-01",
128+
"dependsOn": [
129+
"[variables('function_ResourceId')]"
130+
],
131+
"properties": {
132+
"AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storage_name'), ';AccountKey=', listKeys(variables('storage_ResourceId'), '2017-10-01').keys[0].value, ';EndpointSuffix=', 'core.windows.net')]",
133+
"FUNCTIONS_EXTENSION_VERSION": "~3",
134+
"FUNCTIONS_WORKER_RUNTIME": "dotnet"
135+
}
136+
}
137+
]
138+
},
139+
{
140+
"location": "[parameters('resourceGroupLocation')]",
141+
"name": "[variables('storage_name')]",
142+
"type": "Microsoft.Storage/storageAccounts",
143+
"apiVersion": "2017-10-01",
144+
"tags": {
145+
"[concat('hidden-related:', concat('/providers/Microsoft.Web/sites/', parameters('resourceName')))]": "empty"
146+
},
147+
"properties": {
148+
"supportsHttpsTrafficOnly": true
149+
},
150+
"sku": {
151+
"name": "Standard_LRS"
152+
},
153+
"kind": "Storage"
154+
},
155+
{
156+
"location": "[parameters('resourceGroupLocation')]",
157+
"name": "[variables('appServicePlan_name')]",
158+
"type": "Microsoft.Web/serverFarms",
159+
"apiVersion": "2015-02-01",
160+
"kind": "linux",
161+
"properties": {
162+
"name": "[variables('appServicePlan_name')]",
163+
"sku": "Standard",
164+
"workerSizeId": "0",
165+
"reserved": true
166+
}
167+
}
168+
]
169+
}
170+
}
171+
}
172+
]
173+
}

src/conference-ia/src/Components/TextToSpeech.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ interface ConferenceContext {
1111
const TextToSpeech: React.FC<ConferenceContext> = ({ content }) => {
1212
try {
1313

14-
const key : string = process.env.SPEECH_KEY || "";
15-
const region : string = process.env.SPEECH_REGION || "";
14+
const key : string = process.env.VITE_COG_SVC_SUB_KEY || "";
15+
const region : string = process.env.VITE_COG_SVC_REGION || "";
1616
let speechConfig = sdk.SpeechConfig.fromSubscription(key, region);
1717
speechConfig.speechSynthesisVoiceName = "fr-FR-CoralieNeural";
1818
let synthesizer = new sdk.SpeechSynthesizer(speechConfig);

0 commit comments

Comments
 (0)