How To Deploy React.JS, Flask And Spring Boot To Heroku
Install the Heroku CLI
Download and install the Heroku CLI.
If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.
$ heroku login
Create a new Git repository
Initialize a git repository in a new or existing directory
$ cd my-project/ $ git init $ heroku git:remote -a your appname
Deploy your application
Commit your code to the repository and deploy it to Heroku using Git.
$ git add . $ git commit -am "make it better" $ git push heroku master
Existing Git repository
For existing repositories, simply add the heroku
remote
View your code diffs on GitHub
Connect your app to a GitHub repository to see commit diffs in the activity log.
Deploy changes with GitHub
Connecting to a repository will allow you to deploy a branch to your app.
Automatic deploys from GitHub
Select a branch to deploy automatically whenever it is pushed to.
Create review apps in pipelines
Pipelines connected to GitHub can enable review apps, and create apps for new pull requests. Learn more.
8. Using container Resister
Install the Heroku CLI
Download and install the Heroku CLI.
If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.
$ heroku login
Log in to Container Registry
You must have Docker set up locally to continue. You should see output when you run this command.
$ docker ps
Now you can sign into Container Registry.
$ heroku container:login
Push your Docker-based app
Build the Dockerfile in the current directory and push the Docker image.
$ heroku container:push web
Deploy the changes
Release the newly pushed images to deploy your app.
$ heroku container:release web
Comments