Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

Heroku .NET Core Buildpack for worker dyno

License

Notifications You must be signed in to change notification settings

sink-archive/dotnetcore-buildpack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heroku .NET Core Buildpack

This is the Heroku buildpack for ASP.NET Core. (Except it uses the worker dyno now)

Actions Status

The Buildpack supports C# and F# projects. It searchs through the repository's folders to locate a Startup.* or Program.* file. If found, the .csproj or .fsproj in the containing folder will be used in the dotnet publish <project> command.

If repository contains multiple Web Applications (multiple Startup.* or Program.*), PROJECT_FILE and PROJECT_NAME environment variables allow to choose project for publishing.

Usage

.NET Core latest stable

heroku buildpacks:set jincod/dotnetcore

.NET Core edge

heroku buildpacks:set https://github.com/jincod/dotnetcore-buildpack

Previous releases

heroku buildpacks:set https://github.com/jincod/dotnetcore-buildpack#version

Available releases

More info

Entity Framework Core Migrations

You cannot run migrations with the dotnet ef commands using .NET Local Tools once the app is built. Alternatives include:

Enabling Automatic Migrations

  • Ensure the ASPNETCORE_ENVIRONMENT environment variable is set to Production. ASP.NET Core scaffolding tools may create files that explicitly set it to Development. Heroku config will override this (heroku config:set ASPNETCORE_ENVIRONMENT=Production).
  • Configure your app to automatically run migrations at startup by adding the following to the .csproj file:
<Target Name="PrePublishTarget" AfterTargets="Publish">
  <Exec Command="dotnet ef database update" />
</Target>
  • Configure your connection string string appropriately, for example, for PostgreSQL:

sslmode=Prefer;Trust Server Certificate=true

Manually Running Migration Scripts on the Database

  • Manually run SQL scripts generated by Entity Framework Core in your app's database. For example, use PG Admin to connect your Heroku Postgres service.

Node.js and NPM

heroku buildpacks:set jincod/dotnetcore
heroku buildpacks:add --index 1 heroku/nodejs

Using Multiple Buildpacks for an App

Example

ASP.NET Core Demo App

Donation

If this project help you, you can give me a cup of coffee ☕

Donate

About

Heroku .NET Core Buildpack for worker dyno

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 98.6%
  • Makefile 1.4%