Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added deployment-specific configuration.

  • Loading branch information...
commit 5ff11fbb00ae2e5e86e3153145bd9197d966f1ca 1 parent e20af8e
Peter Ledbrook pledbrook authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 grails.org/grails-app/conf/Config.groovy
8 grails.org/grails-app/conf/Config.groovy
View
@@ -1,7 +1,13 @@
// locations to search for config files that get merged into the main config
// config files can either be Java properties files or ConfigSlurper scripts
+import org.codehaus.groovy.grails.web.context.ServletContextHolder
-grails.config.locations = [ "file:/var/lib/grails/site-config.properties" ]
+environments {
+ production {
+ def target = ServletContextHolder.servletContext.getInitParameter("deployTarget")
+ grails.config.locations = [ "file:/var/lib/grails/site-config${target ? '-' + target : ''}.properties" ]
+ }
+}
// if(System.properties["${appName}.config.location"]) {
// grails.config.locations << "file:" + System.properties["${appName}.config.location"]
Please sign in to comment.
Something went wrong with that request. Please try again.