2.10 Deploying an Application 2.4.4

See the light - agile, industrial strength, rapid web application development made easy

(Quick Reference) # 2.10 Deploying an Application - Reference Documentation Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari Version: 2.4.4 ## 2.10 Deploying an Application Grails applications are deployed as Web Application Archives (WAR files), and Grails includes the war command for performing this task:
    grails war
This will produce a WAR file under the `target` directory which can then be deployed as per your container's instructions. Unlike most scripts which default to the `development` environment unless overridden, the `war` command runs in the `production` environment by default. You can override this like any script by specifying the environment name, for example:
    grails dev war
NEVER deploy Grails using the run-app command as this command sets Grails up for auto-reloading at runtime which has a severe performance and scalability implications When deploying Grails you should always run your containers JVM with the `-server` option and with sufficient memory allocation. A good set of VM flags would be:
    -server -Xmx512M -XX:MaxPermSize=256m
| Quick Reference (hide)