After cloning the repository build the project to make sure everything is okay. Then, run the command to create the database and the tables. By default, it will create an SQServer database. To change that, navigate to appsettings.json
Update-Database
Production or Development
.Net Core 5.0
Inside the project build the docker file using the following command.
docker build -t myapp:1.0 .
After that, tag the heroku target image.
docker tag myapp:1.0 registry.heroku.com/you_app_name/web
To see if everything is okay before pushing the image to heroko, let's see if the image is working as expected by running the falowing comand:
docker run -d -p 80:8080 myapp:1.0
Then, type:
https://localhost:8080
To push push the docker image to heroku, type:
heroku container:push web -a you_app_name
Releasing the container on heroku.
heroku container:release web -a you_app_name