---
"title": "Deploy Grails Applications on Heroku"
"description": "We're happy to announce the public beta of Grails application deployment on Heroku with support for Grails 1.3.7 and 2.0 provided by the open source Heroku"
"date": "2011-12-15"
"authors":
  -
    "name": "Jesper Joergensen"
"url": "https://wp-www-staging.heroku.com/blog/grails/"
"categories":
  - "News"
---

# Deploy Grails Applications on Heroku

***UPDATE**: [Grails 2 support is deprecated](https://devcenter.heroku.com/changelog-items/1165) and ending on June 1, 2017. For Grails 3, please see the documentation for [Deploying Gradle Apps on Heroku](https://devcenter.heroku.com/articles/deploying-gradle-apps-on-heroku), as Grails 3 and onward use Gradle as their packaging mechanism.*

We're happy to announce the public beta of Grails application deployment on Heroku with support for [Grails](https://grails.org/) 1.3.7 and 2.0 provided by the open source [Heroku Grails buildpack](https://github.com/heroku/heroku-buildpack-grails).

Grails is a high-productivity web application framework for the JVM based on the [Groovy programming language](https://groovy-lang.org/) and featuring many similarities with Rails. Since its inception in 2006, the framework has enjoyed broad adoption in the Java community as it combines the strengths of the JVM and richness of the Java platform with the productivity benefits of modern frameworks like Rails.

Today the Grails team [announced Grails 2.0](https://spring.io/blog/2011/12/15/web-development-evolved-grails-2-0-released), the latest incarnation of the framework. It features numerous large improvements including an overhauled command line tool, faster and more reliable reloads, and static asset support. Details are covered in the [What's New](https://grails.github.io/grails2-doc/2.0.x/guide/single.html#whatsNew) section of the Grails docs.

The release includes the [Grails Heroku plugin](https://github.com/grails-plugins/grails-heroku) that provides simple commands to set up your Grails app with Heroku add-on services like [Postgres](https://elements.heroku.com/addons/heroku-postgresql) and [Redis](https://elements.heroku.com/addons/heroku-redis).

##  [Deploying a Grails app on Heroku](#deploying-a-grails-app-on-heroku)

Create a new Grails project:

```
$ grails createApp HelloWorld
| Created Grails Application at /Users/jjoergensen/dev/HelloWorld
$ cd HelloWorld
```

Commit to Git:

```
$ grails integrate-with --git
$ git init
Initialized empty Git repository in /Users/jjoergensen/dev/HelloWorld/.git/
$ git add .
$ git commit -m init
[master (root-commit) bd0f36b] init
 58 files changed, 2788 insertions(+), 0 deletions(-)
 create mode 100644 .classpath
 create mode 100644 .gitignore
 create mode 100644 .project
...
```

Create Heroku Cedar app:

```
$ heroku create --stack cedar
Creating smooth-night-8061... done, stack is cedar
https://smooth-night-8061.herokuapp.com/ | git@heroku.com:smooth-night-8061.git
Git remote heroku added
```

Deploy to Heroku:

```
$ git push heroku master
Counting objects: 73, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (69/69), done.
Writing objects: 100% (73/73), 97.82 KiB, done.
Total 73 (delta 2), reused 0 (delta 0)

-----> Heroku receiving push
-----> Grails app detected
-----> Grails 2.0.0 app detected
-----> Installing Grails 2.0.0..... done
-----> executing grails -plain-output -Divy.default.ivy.user.dir=/app/tmp/repo.git/.cache war

       |Loading Grails 2.0.0.
       ...
       |Done creating WAR target/HelloWorld-0.1.war
-----> No server directory found. Adding jetty-runner 7.5.4.v20111024 automatically.
-----> Discovering process types
       Procfile declares types  -> (none)
       Default types for Grails -> web
-----> Compiled slug size is 30.6MB
-----> Launching... done, v3
       https://smooth-night-8061.herokuapp.com deployed to Heroku
```

##  [Learn More](#learn-more)

- [How Heroku works](https://devcenter.heroku.com/articles/how-heroku-works)
- [Sign up](https://signup.heroku.com/) for a Heroku account. It's free to get started.
- Learn more about [Grails](https://grails.org/)
- The [Heroku Grails buildpack](https://github.com/heroku/heroku-buildpack-grails)