Dark abstract backdrop with subtle blue and gray gradients, evoking a technical cloud-computing atmosphere.

Deploying a Grails Application Using AppFog

A step-by-step tutorial on packaging and deploying your Grails app to the cloud.

Deploying a Grails Application Using AppFog

Once your Grails application is tested and ready for production, the next step is packaging it and deploying it to a JVM application server. Cloud hosting has become increasingly popular, with platform services from providers such as Amazon, Google, and others. One free service that supported Grails deployment was AppFog.

Packaging Your Application

Grails makes it straightforward to produce a deployable WAR file. From your project directory, run:

grails war

This command compiles your application and packages it into a standard WAR archive, ready for deployment to any servlet container or cloud platform that supports Java web applications.

AppFog's Free Tier

At the time of this tutorial, AppFog offered a free tier with the following resources:

  • 2 GB of RAM — sufficient for multiple small applications
  • Up to 8 provisioned services — including MySQL, PostgreSQL, Redis, and others

A basic Grails application typically consumed about 500 MB of RAM, leaving ample headroom within the free allocation for additional services or a second application instance.

Deploying to AppFog

After creating an AppFog account and installing their command-line tool, you could push your WAR file directly to the platform. The service handled provisioning of the Java runtime, assigning a URL, and binding any requested backing services such as a MySQL database — all without manual server configuration.

For Grails developers exploring cloud deployment options in the early 2010s, AppFog represented a low-friction way to get an application live without upfront infrastructure costs.