diff --git a/application.properties b/application.properties index df581764532..19417d52221 100644 --- a/application.properties +++ b/application.properties @@ -7,7 +7,7 @@ app.grails.version=1.3.7 app.name=openboxes app.revisionNumber=11160 app.servlet.version=2.4 -app.version=0.7.13 +app.version=0.7.14 plugins.barcode4j=0.2.1 plugins.bubbling=2.1.4 plugins.clickstream=0.2.0 diff --git a/grails-app/conf/Config.groovy b/grails-app/conf/Config.groovy index e1985ebffc9..f2b88b3cfea 100644 --- a/grails-app/conf/Config.groovy +++ b/grails-app/conf/Config.groovy @@ -23,6 +23,20 @@ grails.config.locations = [ "file:${userHome}/.grails/${appName}-config.properties", "file:${userHome}/.grails/${appName}-config.groovy" ] + +// Allow admin to override the config location using command line argument +configLocation = System.properties["${appName}.config.location"] +if (configLocation) { + grails.config.locations << "file:" + configLocation +} + +// Allow admin to override the config location using environment variable +configLocation = System.env["${appName.toString().toUpperCase()}_CONFIG_LOCATION"] +if (configLocation) { + grails.config.locations << "file:" + configLocation +} + + println "Using configuration locations ${grails.config.locations} [${GrailsUtil.environment}]" //grails.plugins.reloadConfig.files = []