-
Notifications
You must be signed in to change notification settings - Fork 3
Deployment
We currently use Heroku to host our web site. Heroku is a free (also has paid plans) platform to deploy applications online. In this article you will fiund the deployment instructions for our Heroku server.
- Access to RoBorregos account in Heroku.
- Third party software Heroku CLI (Command Line Interface).
There are two ways to setup a heroku server: you can either start a hroku server from your terminal and deploy content, or you can create a heroku server from the web ui and link it to your existing project. In this case, we are going to describe how to follow the second options.
-
Fire up a terminal and login to heroku from it:
$ heroku login
this command will open a heroku authentication view in your default browser.
- Click on "Create a new app" and fill the information required about the new app.
That's it! You are all set up to start deploying to production. Is that simple!
Now that you have created an application in heroku, it's time to deploy some stuff so you can see it working!
-
Fire up a terminal and login to heroku:
$ heroku login
-
In the web ui from heroku go to your project'information and click on the "Deploy" tab. In this tab you can see different methods to deploy an existing app to heroku, but we are going to focus on the Heroku Git merthod (using Heroku CLI).
-
In your terminal, go into the project's directory:
$ cd roborregos-web
-
At the bottom if this view, in the "Existing Git repository" section, you will be able to se a command. Something linke:
$ heroku git:remote -a roborregos-web
Run that command in yout terminal to add the remote reference in your local project.
Once you have all the setup correctly executed, you should have your local project references to heroku as the current server. So you only will neeed to push your master branch into heroku's master branch to deploy the current application, just as you do with github.
-
Add the latest changes:
$ git add .
-
Commit the changes:
$ git commit -m 'Releases vX.X.X'
-
Deploy the latest changes into heroku's
master
branch:$ git push heroku master
NOTE: Heroku only deploys its master branch, so that is why it is important that every new release is pushed to Heroku's master
.
If you want to learn more about about deployment with Heroku, you can visit the Heroku's Deployment documentation, where you would find different deployment methods, others than the one described in this wiki.