Book Image

Heroku Cookbook

By : Mike Coutermarsh
Book Image

Heroku Cookbook

By: Mike Coutermarsh

Overview of this book

Heroku is a Platform as a Service that enables developers to rapidly deploy and scale their web applications. Heroku is designed for developer happiness, freeing developers from doing system administrative tasks such as configuring servers and setting up load balancers. Developers are able to focus on what they do best, building web applications, while leaving the details of deployment and scaling to the experts at Heroku. This practical guide is packed with step-by-step solutions to problems faced by every production-level web application hosted on Heroku. You'll quickly get comfortable with managing your Heroku applications from the command line and then learn everything you need to know to deploy and administer production-level web applications.
Table of Contents (17 chapters)
Heroku Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Deploying from tags


Git tags are an easy way to track the versions of our application. In this recipe, we'll learn how to tag our Git repositories and then deploy specific versions to Heroku.

How to do it…

To start, let's open up a terminal and navigate to one of our Heroku apps by performing the following steps:

  1. We can add our first tag with the git tag command. We'll need to specify the tag as well as a message that describes it:

    $ git tag -a v1.0 -m "Version 1 release. Example of a release tag"
    

    Note

    The tag does not have to be a version number. We can use anything we want.

  2. Next, we'll want to push our new tag up to our origin repository:

    $ git push—tags origin
    Counting objects: 1, done.
    Writing objects: 100% (1/1), 187 bytes | 0 bytes/s, done.
    Total 1 (delta 0), reused 0 (delta 0)
    To https://github.com/mscoutermarsh/refinery_heroku.git
    * [new tag]         v1.0 -> v1.0
    
  3. If we're using GitHub to host our repository, we will now see a new tag under the Releases section.

  4. The last step is to push...