-
Notifications
You must be signed in to change notification settings - Fork 174
/
Config.groovy
executable file
·306 lines (272 loc) · 10.1 KB
/
Config.groovy
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
import grails.util.Environment
import pl.burningice.plugins.image.engines.scale.ScaleType
// 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 = [ "file:./${appName}-config.groovy", "classpath:${appName}-config.groovy" ]
// local file for storing API keys at dev time
def localUserConfig = new File(System.getProperty("user.home"), ".grails-website-config.groovy")
if(localUserConfig.exists()) {
grails.config.locations << localUserConfig.toURI().toURL()
}
// if(System.properties["${appName}.config.location"]) {
// grails.config.locations << "file:" + System.properties["${appName}.config.location"]
// }
wiki.supported.upload.types = ['image/png','image/jpg','image/jpeg','image/gif']
// location of plugins-list.xml
plugins.pluginslist = "http://plugins.grails.org/.plugin-meta/plugins-list.xml"
plugins.fisheye = "http://svn.codehaus.org/grails-plugins"
plugins.location = "http://plugins.grails.org"
plugins.forum.mail.to = "plugins-announce@nowhere.net"
plugins.forum.mail.from = "test@grails.org"
grails.plugins.disqus.shortname = "grails"
grails.mail.port = 3025
grails.mime.use.accept.header = true
grails.mime.file.extensions = false // enables the parsing of file extensions from URLs into the request format
grails.mime.types = [ html: ['text/html','application/xhtml+xml'],
xml: ['text/xml', 'application/xml'],
text: 'text/plain',
js: 'text/javascript',
rss: 'application/rss+xml',
atom: 'application/atom+xml',
css: 'text/css',
csv: 'text/csv',
all: '*/*',
json: ['application/json','text/json'],
form: 'application/x-www-form-urlencoded',
multipartForm: 'multipart/form-data'
]
// The default codec used to encode data with ${}
grails.views.default.codec="none" // none, html, base64
grails.views.gsp.encoding="UTF-8"
grails.converters.encoding="UTF-8"
grails.app.context = "/"
grails.scaffolding.templates.domainSuffix="Instance"
// enabled native2ascii conversion of i18n properties files
grails.enable.native2ascii = true
grails.json.legacy.builder=false
// set per-environment serverURL stem for creating absolute links
environments {
test {
searchable.compassConnection = "ram://test-index"
}
}
bi {
WikiImage {
prefix = 'wiki-'
images {
large {
scale = [width: 600, height: 700, type: ScaleType.APPROXIMATE]
}
small {
scale = [width: 100, height: 100, type: ScaleType.APPROXIMATE]
}
}
constraints {
nullable = true
maxSize = 2 * 1024 * 1024
contentType = ['image/gif', 'image/png', 'image/jpeg']
}
}
}
searchable {
compassConnection = new File(System.getProperty("user.home"), ".grails-website-searchable-index").absolutePath
compassSettings = [
'compass.engine.analyzer.default.type': "Snowball",
'compass.engine.analyzer.default.name': "English",
'compass.engine.optimizer.schedule.period': '300',
'compass.engine.mergeFactor':'1000',
'compass.engine.maxBufferedDocs':'1000',
'compass.engine.ramBufferSize': '128',
'compass.engine.useCompoundFile': 'false',
'compass.transaction.processor': 'read_committed',
'compass.transaction.processor.read_committed.concurrentOperations': 'false',
'compass.transaction.lockTimeout': '30',
'compass.transaction.lockPollInterval': '500',
'compass.transaction.readCommitted.translog.connection': 'ram://'
]
defaultExcludedProperties = ["password"]
defaultFormats = [:]
defaultMethodOptions = [
search: [reload: false, escape: false, offset: 0, max: 10, defaultOperator: "and"],
suggestQuery: [userFriendly: true]
]
mirrorChanges = false
bulkIndexOnStartup = false
domain {
comment = {
root false
only = ["body"]
body name: "comment"
}
tag = {
root false
name name: "tag"
}
}
}
oauth {
providers {
twitter {
api = org.scribe.builder.api.TwitterApi
successUri = '/oauth/success?provider=twitter'
failureUri = '/unauthorized'
key = 'twitter-key'
secret = 'twitter-secret'
callback = "http://localhost:8080/oauth/twitter/callback"
}
facebook {
api = org.scribe.builder.api.FacebookApi
successUri = '/oauth/success?provider=facebook'
failureUri = '/unauthorized'
key = 'google-key'
secret = 'google-secret'
callback = "http://localhost:8080/oauth/google/callback"
}
google {
api = org.scribe.builder.api.GoogleApi
successUri = '/oauth/success?provider=google'
failureUri = '/unauthorized'
scope = 'https://www.googleapis.com/auth/userinfo.email'
key = 'google-key'
secret = 'google-secret'
callback = "http://localhost:8080/oauth/google/callback"
}
// github {
// api = org.scribe.builder.api.GitHubApi
// successUri = '/oauth/success?provider=facebook'
// failureUri = '/unauthorized'
// }
}
}
security {
shiro {
oauth {
linkAccountUrl = "/oauth/linkaccount"
}
filter {
basicAppName='grails.org'
filterChainDefinitions = """
/plugin/** = authcBasic[PUT]
/api/v1.0/publish/** = authcBasic[POST]
"""
}
}
}
springcache {
disabled = false
defaults {
// set default cache properties that will apply to all caches that do not override them
eternal = false
diskPersistent = false
overflowToDisk = false
}
caches {
contentCache {
// set any properties unique to this cache
timeToLive = 300
diskPersistent = false
overflowToDisk = false
}
pluginCache {
// set any properties unique to this cache
timeToLive = 300
diskPersistent = false
overflowToDisk = false
}
}
}
/*
beans {
pluginDeployService {
releaseUrl = "http://localhost:8085/artifactory/plugins-release-local/org/grails/plugins"
snapshotUrl = "http://localhost:8085/artifactory/plugins-snapshot-local/org/grails/plugins"
deployUsername = "admin"
deployPassword = "password"
}
}*/
grails.cache.config = {
cache {
name 'content'
eternal false
overflowToDisk true
timeToLiveSeconds 300
maxElementsInMemory 10000
maxElementsOnDisk 100000
}
cache {
name 'wiki'
eternal false
overflowToDisk true
timeToLiveSeconds 300
maxElementsInMemory 10000
maxElementsOnDisk 100000
}
cache {
name 'text'
eternal false
overflowToDisk false
maxElementsInMemory 10000
}
cache {
name 'plugin'
eternal false
overflowToDisk false
maxElementsInMemory 10000
}
cache {
name 'permissions'
eternal false
overflowToDisk false
maxElementsInMemory 10000
}
}
// Dummy Twitter settings.
twitter.consumerKey="E1U4T7KgPdaGFagdpbdQ"
twitter.consumerSecret="hUseBLu9jcGPEdvaco2c0yAA9tIQDZS34QsTG0GsY"
twitter.accessKey="ksdfhkasfjhksdfjhklsad"
twitter.accessSecret="test"
rest.dateFormat = "yyyy-MM-dd"
format.date = 'MMM d, yyyy'
blog.page.layout="subpage"
grails.blog.author.evaluator= {
request.user
}
grails.gorm.default.mapping = {
'user-type' type: org.jadira.usertype.dateandtime.joda.PersistentDateTime, class: org.joda.time.DateTime
'user-type' type: org.jadira.usertype.dateandtime.joda.PersistentLocalDate, class: org.joda.time.LocalDate
}
// Enable these in a site-config.groovy file.
grails.plugin.databasemigration.changelogLocation = "migrations"
grails.plugin.databasemigration.updateOnStart = false
grails.plugin.databasemigration.updateOnStartFileNames = ["changelog.groovy"]
// log4j configuration
log4j = {
if(Environment.current == Environment.PRODUCTION || System.getProperty("use.prod.logging")) {
appenders {
rollingFile name:"errorLog", maxFileSize:"5MB", maxBackupIndex: 10, file:"${System.getProperty('user.home')}/logs/grails-website-error.log", 'append':true, threshold:org.apache.log4j.Level.WARN
rollingFile name:"stacktrace", maxFileSize:"5MB", maxBackupIndex: 10, file:"${System.getProperty('user.home')}/logs/grails-website-stacktrace.log", 'append':true, threshold:org.apache.log4j.Level.ALL
console name:'stdout', threshold:org.apache.log4j.Level.WARN
}
root {
warn "errorLog", "stdout"
}
}
error 'org.hibernate',
'org.springframework.web.client.RestTemplate',
'org.radeox'
warn 'org.codehaus.groovy.grails.web.servlet',
'org.codehaus.groovy.grails.web.pages', // GSP
'org.codehaus.groovy.grails.web.sitemesh', // layouts
'org.codehaus.groovy.grails.commons', // core / classloading
'org.codehaus.groovy.grails.plugins', // plugins
'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
'org.springframework'
}
// databinding config
grails.databinding.convertEmptyStringsToNull=false
// exclude some assets from default precompilation, these assets get included
grails.assets.excludes = ['**/bootstrap/**', '**/font-awesome/**', '**/grails-*.less', '**/responsive/**', '**/libs/**', '**/fancybox/**']
// read-only token for Github API access, no GH oauth scopes should be granted to the token
githubApiReadOnlyToken = ''
// cache queries by default
grails.hibernate.cache.queries = true