Skip to content

Commit

Permalink
Improve cold start
Browse files Browse the repository at this point in the history
  • Loading branch information
Hekku2 committed Jul 16, 2024
1 parent 16caf56 commit 69d94ad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -404,3 +404,5 @@ FodyWeavers.xsd
developer-settings.json
publish.zip
src/FunctionApp.Isolated/dev_secrets/sendimage.json

__azurite_db_*.json
5 changes: 5 additions & 0 deletions infra/functions.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ resource functionApp 'Microsoft.Web/sites@2023-12-01' = {
defaultDocuments: []
linuxFxVersion: 'DOTNET-ISOLATED|8.0'
phpVersion: null
netFrameworkVersion: 'v8.0'
use32BitWorkerProcess: false
ftpsState: 'Disabled'
minTlsVersion: '1.2'
Expand Down Expand Up @@ -163,6 +164,10 @@ resource functionApp 'Microsoft.Web/sites@2023-12-01' = {
name: 'FUNCTIONS_WORKER_RUNTIME'
value: 'dotnet-isolated'
}
{
name: 'WEBSITE_USE_PLACEHOLDER_DOTNETISOLATED'
value: '1'
}
{
name: 'APPINSIGHTS_INSTRUMENTATIONKEY'
value: reference(applicationInsights.id, '2015-05-01').InstrumentationKey
Expand Down
3 changes: 3 additions & 0 deletions src/FunctionApp.Isolated/FunctionApp.Isolated.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>DiscordImagePoster.FunctionApp.Isolated</RootNamespace>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.20.0" />
<PackageReference Include="Discord.Net.Rest" Version="3.15.2" />
Expand Down

0 comments on commit 69d94ad

Please sign in to comment.