How To Deploy React.JS, Flask And Spring Boot To Heroku


1.Open your account in Heroku Server :-
*   https://www.heroku.com/
*  It is free , when i am using this now , 
2.
3.Click on new on the right side of the section
4.Create a new app
   * Fill the app name , location is us , click create app.
5.Deployment method :
       * Heroku git
       * github
       * Container register
6.Chose any of the from your preference.
     * Deploy using Heroku Git
Use git in the command line or a GUI tool to deploy this app.

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

$ heroku git:remote -a your appname



7.For git connection :-
Connect to GitHub
Connect this app to GitHub to enable code diffs and deploys.

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

Buy me a coffee

Back to top