Skip to content

Instantly share code, notes, and snippets.

@emmanueltissera
Last active January 31, 2018 11:21
Show Gist options
  • Save emmanueltissera/078af0619059060144c6f0fafea768b9 to your computer and use it in GitHub Desktop.
Save emmanueltissera/078af0619059060144c6f0fafea768b9 to your computer and use it in GitHub Desktop.
ASP.NET Core 2.0 Kentico Cloud app on Google Cloud Platform - A Quick How-To
runtime: aspnetcore
api_version: '1.0'
env: flexible
threadsafe: true
automatic_scaling:
min_num_instances: 1
max_num_instances: 10
cpu_utilization:
target_utilization: 0.5
env_variables:
ASPNETCORE_ENVIRONMENT: production
"DeliveryOptions": {
"ProjectId": "",
"UsePreviewApi": false,
"PreviewApiKey": ""
}
dotnet new --install "KenticoCloud.CloudBoilerplateNet::*"
dotnet new kentico-cloud-mvc --name "DancingGoatGcp" --output D:\Home\wwwroot\
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<UserSecretsId>DancingGoatGcp</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
<PackageReference Include="KenticoCloud.Delivery" Version="4.12.0" />
<PackageReference Include="SimpleMvcSitemap" Version="3.1.0" />
</ItemGroup>
<ItemGroup>
<None Update="IISUrlRewrite.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
- Remove <add input="{REQUEST_METHOD}" pattern="^get$|^head$" /> at line 8
- Add <add input="{HTTP_HOST}" negate="true" pattern="kc-dancinggoat.appspot.com" /> at line 12. Remember to change this to the name of your app engine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment