2.10 Deploying an Application - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari
Version: 2.3.8
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
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 implicationsWhen 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