ASP.NET Core 1.0 Buildpack
Sample of using this buildpack is availabel here.
Sample is available here
-
Create new Heroku App
-
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.
-
Add ASP.NET-Core buildpack. Open "Settings" tab in Heroku App dashboard, go to "Buildpack" section and add next buildpacks:
-
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" ],