Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve cold start #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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