-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault-config.groovy
More file actions
99 lines (92 loc) · 2.67 KB
/
Copy pathdefault-config.groovy
File metadata and controls
99 lines (92 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
String mysqlHost = System.getProperty('errbuddy.mysql.host') ?: "mariadb"
String mysqlDatabase = System.getProperty('errbuddy.mysql.database') ?: "errbuddy"
String mysqlUser = System.getProperty('errbuddy.mysql.user') ?: "errbuddy"
String mysqlPassword = System.getProperty('errbuddy.mysql.password') ?: "123456"
String redisHost = System.getProperty('errbuddy.redis.host') ?: "redis"
String redisPort = System.getProperty('errbuddy.redis.port') ?: "6379"
String elasticsearchHost = System.getProperty('errbuddy.elasticsearch.host') ?: "elasticsearch"
String elasticsearchPort = System.getProperty('errbuddy.elasticsearch.port') ?: "9300"
println "########################################################################"
println "# Mysql Configuration:"
println "# host: $mysqlHost"
println "# db : $mysqlDatabase"
println "# user: $mysqlUser"
println "# Redis Configuration:"
println "# host: $redisHost"
println "# port: $redisPort"
println "# Elasticsearch Configuration:"
println "# host: $elasticsearchHost"
println "# port: $elasticsearchPort"
println "########################################################################"
dataSource {
dbCreate = "none" // sql-migration plugin will do that for us!
driverClassName = "com.mysql.jdbc.Driver"
url = "jdbc:mysql://${mysqlHost}/${mysqlDatabase}?generateSimpleParameterMetadata=true&zeroDateTimeBehavior=convertToNull"
username = mysqlUser
password = mysqlPassword
properties {
maxActive = 100
minEvictableIdleTimeMillis = 1800000
timeBetweenEvictionRunsMillis = 1800000
numTestsPerEvictionRun = 3
testOnBorrow = true
testWhileIdle = true
testOnReturn = true
validationQuery = "SELECT 1"
}
}
springsession {
redis {
connectionFactory {
host = redisHost
port = Integer.parseInt(redisPort)
timeout = 2000
usePool = true
dbIndex = 5
}
}
}
grails {
serverURL = System.getProperty('errbuddy.serverUrl')
redis {
host = redisHost
port = Integer.parseInt(redisPort)
poolConfig {
// jedis pool specific tweaks here, see jedis docs & src
testWhileIdle = true
maxTotal = 500
}
timeout = 2000 //default in milliseconds
}
}
errbuddy {
defaultMax = 20
maximumMax = 100
supportedLanguages = ['en']
defaultLanguage = 'en'
retentionDays = 90
}
elasticSearch {
client {
mode = 'transport'
hosts = [
[
host: elasticsearchHost,
port: Integer.parseInt(elasticsearchPort)
]
]
}
datastoreImpl = 'hibernateDatastore'
cluster.name = 'elasticsearch'
bulkIndexOnStartup = false
}
grails {
plugin {
errbuddy {
enabled = false
host = System.getProperty('errbuddy.serverUrl')
apiKey = "9hSsjixHbPI64bjgwkUPXrxVXfpitxM6f9ZRyT06OGdxjDumNhD4gemO3cN6vDr"
exceptionsOnly = false
}
}
}