Skip to content

Latest commit

 

History

History
36 lines (35 loc) · 1.8 KB

README.md

File metadata and controls

36 lines (35 loc) · 1.8 KB

Heroku Deployment

Heroku PaaS was used to deploy these apps. Heroku CLI provides the option to directly push the repo aur app to heroku to be deployed. The OS in use is Ubuntu.

Blog post with more details:

Deploying ML Apps on Heroku

Installing Heroku CLI :

$ sudo snap install --classic heroku

Creating a Heroku app :

$ heroku create appname.

Deploying the Backend of the server:

While Deploying the backend sever make sure to include the Procfile in your git repository which tells the heroku from where to start the web app. Contents of Procfile -

web: gunicorn main:app

Open the terminal in the server folder and follow the following steps

$ git init
$ heroku git:remote -a appname
$ git add .
$ git commit -m “your message”
$ git push heroku master 

The link for the server is created. Update the server link in the config.js inside frontend/src

Deploying the frontend:

After the link is created and updated inside config.js in the src folder follow the following steps to deploy frontend. Create another app using
$ heroku create complete_app.

Open the terminal in the frontend folder and follow the following steps.

$ heroku git:remote -a appname
$ git add .
$ git commit -m “your message”
$ git push heroku master 

NOTE : While Deploying the given codebase in frontend make sure to remove the '-p 8000' which is the local port from scripts in package.json located in frontend/package.json
The final app link will be generated which can be used for the purpose.
The same method above can be used to deploy the streamlit app