Skip to content

nekoni/aspnetcore-buildpack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

aspnetcore-buildpack

ASP.NET Core 1.0 Buildpack

Sample of using this buildpack is availabel here.


How to use this buildpack to deploy your code on Heroku

Sample is available here

  1. Create new Heroku App

  2. Configure NodeJS environment. This step is only for apps that requeries to node, npm to be isntalled.

    Add NodeJS buildpack. To do so open "Settings" tab in Heroku App dashboard, go to "Buildpack" section and add next buildpacks:

    • heroku/nodejs

    then, if needed, install npm packages using package.json Example of package.json file used to install bower:

    {
       "scripts": {
          "preinstall": "npm list bower -g || npm install bower -g",
          "postinstall": "bower cache clean"
       },
       "dependencies": {
       }
    }
    

    Keep in mind, that NodeJS buildpack always requires the package.json file. Add it to root of your repository even if you do not need other then node, npm dependencies.

  3. Add ASP.NET-Core buildpack. Open "Settings" tab in Heroku App dashboard, go to "Buildpack" section and add next buildpacks:

  4. Add Heroku Config Variables

    Buildpack uses the following Config Variables

    • LAUNCH_ASSEMBLY_NAME - the assembly name, that will be used to run app via Kestrel
    • PUBLISH_APP_DIR - the relative path to main published project (relative path to folder that contains main project.json)

Config Variables should be added on "Settings" tab in Heroku app dashboard. Read more about Convig Variables in Heroku documentation

---

Troubleshooting:

  • IF you face with errors like "bower command not found", add calling "which bower" command before. Lets say your prepublish script looks like
"prepublish": [ "bower install" ],

Modify it to

"prepublish": [ "which bower && bower install" ],

About

ASP Net Core Buildpack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%