Permalink
Browse files

Allow db host overrides

  • Loading branch information...
influenza committed May 18, 2014
1 parent 60282f1 commit f21f7d875d56414ceb8fa1dcc95bf93f2096ce63
Showing with 4 additions and 2 deletions.
  1. +4 −2 grails-app/conf/DataSource.groovy
@@ -1,3 +1,5 @@
def dbHost = System.getenv()['PETCLINIC_DB'] ?: "localhost"
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = false
@@ -10,7 +12,7 @@ environments {
development {
dataSource {
dbCreate='update'
url="jdbc:postgresql://localhost:5432/petclinic"
url="jdbc:postgresql://${dbHost}:5432/petclinic"
username = "grails"
password = "super secure"
pooled = true
@@ -34,7 +36,7 @@ environments {
test {
dataSource {
dbCreate = "update"
url = 'jdbc:postgresql://localhost:5432/petclinic'
url = 'jdbc:postgresql://${dbHost}:5432/petclinic'
}
}

0 comments on commit f21f7d8

Please sign in to comment.