From 188f21b91227c7ff783eb08972489e01849bf2fb Mon Sep 17 00:00:00 2001
From: Jonathan Ballet <jballet@edgelab.ch>
Date: Mon, 31 Jul 2017 20:49:45 +0200
Subject: [PATCH 1/3] Allow extra configuration file

In order to override some configuration settings, we can now specify an
additional configuration location using the Java system properties
``ice.config.location`` which points to another configuration file
location.

Otherwise, the only way to set custom configuration parameters is by
overriding this while Config.groovy file.
---
 grails-app/conf/Config.groovy | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/grails-app/conf/Config.groovy b/grails-app/conf/Config.groovy
index 518499b7..fe177004 100644
--- a/grails-app/conf/Config.groovy
+++ b/grails-app/conf/Config.groovy
@@ -17,13 +17,11 @@
 // locations to search for config files that get merged into the main config
 // config files can either be Java properties files or ConfigSlurper scripts
 
-grails.config.locations = [
+grails.config.locations = []
 
-]
-
-// if(System.properties["${appName}.config.location"]) {
-//    grails.config.locations << "file:" + System.properties["${appName}.config.location"]
-// }
+if(System.properties["${appName}.config.location"]) {
+    grails.config.locations << "file:" + System.properties["${appName}.config.location"]
+}
 
 grails.project.groupId = appName // change this to alter the default package name and Maven publishing destination
 grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format

From a9d0344c3cd16eef788f7e40fef9ab075cdd102f Mon Sep 17 00:00:00 2001
From: Jonathan Ballet <jon@multani.info>
Date: Tue, 1 Aug 2017 10:53:04 +0200
Subject: [PATCH 2/3] Update README with reference to ice.config.location

---
 README.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/README.md b/README.md
index 9b379e61..dfe5fec7 100644
--- a/README.md
+++ b/README.md
@@ -263,6 +263,12 @@ Options with * require writing your own code.
 
         ice.use_blended=true
 
+10. Extra Grails configuration file
+
+  If you need to setup custom Grails settings, you can specify an additional configuration file to be loaded by Grails by setting the ``ice.config.location`` system property to the location of that file.
+
+  See http://docs.grails.org/2.3.7/guide/single.html#configExternalized for more information.
+
 ## Example IAM Permissions
 
 Grant the following permissions to either an instance role, or the user running the reports:

From e146c28f2b16768b5eb48197acd7c7748874ba98 Mon Sep 17 00:00:00 2001
From: Jonathan Ballet <jon@multani.info>
Date: Tue, 1 Aug 2017 18:43:15 +0200
Subject: [PATCH 3/3] Fix Grails version in URL

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index dfe5fec7..9197e301 100644
--- a/README.md
+++ b/README.md
@@ -267,7 +267,7 @@ Options with * require writing your own code.
 
   If you need to setup custom Grails settings, you can specify an additional configuration file to be loaded by Grails by setting the ``ice.config.location`` system property to the location of that file.
 
-  See http://docs.grails.org/2.3.7/guide/single.html#configExternalized for more information.
+  See http://docs.grails.org/2.4.4/guide/single.html#configExternalized for more information.
 
 ## Example IAM Permissions