Deployment on heroku
Our application is deployed on heroku using heroku's container repository
Install the heroku cli
We will use the cli for logging into our account and deplying our website. Install the heroku cli for you OS. You can find more info about heroku cli here
Log into you account
heroku login
Provision an app
You can provision an app on heroku dashboard or from the cli. To provision an app from the cli use the below command. be sure to give it a suitable name. for example i am giving it the name akc-react-frontend. We will use this name later to run commands on our app.
heroku apps:create akc-react-frontend --region eu
you can use already provisioned apps. Just use the name of your app.
Set stack of you application to container
There are three types of stacks on heroku. We will be deploying on heroku wih conainer so we will set the stack of our application to container. You can find more info about heroku stacks here
heroku stack:set container -a akc-react-frontend
Log in to the heroku container repository
heroku container:login
Push the container image to the heroku repository
make sure you are in the root direcotry of the project where the Dockerfile resides
heroku container:push web -a akc-react-frontend
Release the image
heroku container:release web -a akc-react-frontend