Heroku - rishavry/WorksPresentation GitHub Wiki
-
Heroku is a cloud-based Platform as a Service (PaaS) for deploying, managing, and scaling modern applications.
-
In my project-Megagram, I would used Heroku to deploy the backend of Reset-Password.
-
Below are the steps I would take to deploy something via Heroku.
-
Go into the git-repository of the project you'd like to deploy. Then, go into the directory of the code you're trying to deploy, if it isn't the root.
-
Add a file named Procfile in your current directory. In this file, write 'web: ' and then list the terminal commands to be executed to start up the production-server2.
-
Create an app in Heroku, then add it to your current repository's remote-origins list using the terminal commands below.
heroku create your-app-name --remote name-of-remote-origin-for-your-app
- Use the terminal command below to enable auto-scaling for the Heroku app of yours, with min and max referring to the number of containers(known as Dynos in Heroku).
heroku ps:autoscale web --min=insert_min_here --max=insert_max_here --app your-app-name
- Add a commit to your git-repository's current-branch, then push the commit to Heroku using the terminal commands below.
git add .
git commit -m "insert commit message here"
git push name-of-remote-origin-for-your-app current-branch-name:main --directory=directory_of_code_to_deploy #omit the --directory tag if the code to deploy is at the root of the repository itself
Now your heroku application can be accessed at https://your-app-name.herokuapp.com!