I tried to test how to deploy .net core app to Heroku using this guide: https://blog.devcenter.co/deploy-asp-net-core-2-0-apps-on-heroku-eea8efd918b6
It in guide this repository is used: https://github.com/mykeels/sample-web-api , I also tried creating project myself with example API.
I always got same error:
2019-02-13T09:37:07.748661+00:00 heroku[web.1]: Starting process with command /bin/sh -c ASPNETCORE_URLS\=http://\*:\30806\ dotnet\ SampleWebApi.dll
2019-02-13T09:37:09.958842+00:00 heroku[web.1]: State changed from starting to crashed
2019-02-13T09:37:10.034930+00:00 heroku[web.1]: State changed from crashed to starting
2019-02-13T09:37:09.940160+00:00 heroku[web.1]: Process exited with status 145
I used this Dockerfile:
FROM microsoft/dotnet:2.1-aspnetcore-runtime
WORKDIR /app
COPY . .
CMD ASPNETCORE_URLS=http://*:$PORT dotnet SampleWebApi.dll
I am using published output (so it should be builded already) for image creation and pushing to Heroku. These processes are successful. I tried quite a few guides with different docker files, but in all cases I got same result. I also tried using buildpacks such as https://github.com/jincod/dotnetcore-buildpack however, none of them worked.
Is there any way to fix this crashing?