source: trunk/grails-app/conf/Config.groovy @ 2

Last change on this file since 2 was 2, checked in by robert@…, 8 years ago

Initial import of basic functionality

File size: 7.2 KB
Line 
1// locations to search for config files that get merged into the main config
2// config files can either be Java properties files or ConfigSlurper scripts
3
4// grails.config.locations = [ "classpath:${appName}-config.properties",
5//                             "classpath:${appName}-config.groovy",
6//                             "file:${userHome}/.grails/${appName}-config.properties",
7//                             "file:${userHome}/.grails/${appName}-config.groovy"]
8
9// if(System.properties["${appName}.config.location"]) {
10//    grails.config.locations << "file:" + System.properties["${appName}.config.location"]
11// }
12
13grails.project.groupId = appName // change this to alter the default package name and Maven publishing destination
14grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
15grails.mime.use.accept.header = false
16grails.mime.types = [ html: ['text/html','application/xhtml+xml'],
17                      xml: ['text/xml', 'application/xml'],
18                      text: 'text/plain',
19                      js: 'text/javascript',
20                      rss: 'application/rss+xml',
21                      atom: 'application/atom+xml',
22                      css: 'text/css',
23                      csv: 'text/csv',
24                      all: '*/*',
25                      json: ['application/json','text/json'],
26                      form: 'application/x-www-form-urlencoded',
27                      multipartForm: 'multipart/form-data'
28                    ]
29
30// URL Mapping Cache Max Size, defaults to 5000
31//grails.urlmapping.cache.maxsize = 1000
32
33// The default codec used to encode data with ${}
34grails.views.default.codec = "none" // none, html, base64
35grails.views.gsp.encoding = "UTF-8"
36grails.converters.encoding = "UTF-8"
37// enable Sitemesh preprocessing of GSP pages
38grails.views.gsp.sitemesh.preprocess = true
39// scaffolding templates configuration
40grails.scaffolding.templates.domainSuffix = 'Instance'
41
42// Set to false to use the new Grails 1.2 JSONBuilder in the render method
43grails.json.legacy.builder = false
44// enabled native2ascii conversion of i18n properties files
45grails.enable.native2ascii = true
46// whether to install the java.util.logging bridge for sl4j. Disable for AppEngine!
47grails.logging.jul.usebridge = true
48// packages to include in Spring bean scanning
49grails.spring.bean.packages = []
50
51// ##################################################################################
52// DO NOT Change these settings!!!
53// You can overwrite them by adding a /grails-app/conf/LocalConfig.groovy.
54// Use /grails-app/conf/_LocalConfig.groovy as an example!
55// Make sure to set SVN to ignore this file!
56
57// Whether to synchronize with gscf or not. By default, synchronization is turned on
58metagenomics.synchronization = true 
59
60// Temporary directory to upload files to.
61// If the directory is given relative (e.g. 'fileuploads/temp'), it is taken relative to the web-app directory
62// Otherwise, it should be given as an absolute path (e.g. '/home/user/sequences')
63// The directory should be writable by the webserver user
64metagenomics.fileUploadDir = "fileuploads"
65
66// Maximum age that uploaded files should be kept on the server before deleting them. When a user uploads a file,
67// but doesn't process the file (e.g. because he leaves the page beforehand or his computer crashes), the files
68// remain in the upload directory. This mechanism ensures that the upload directory is cleaned after some time.
69// The time is given in seconds.
70metagenomics.fileUploadMaxAge = 2 * 24 * 3600
71
72// Directory to save the uploaded files permanently
73// If the directory is given relative (e.g. 'fileuploads/temp'), it is taken relative to the web-app directory
74// Otherwise, it should be given as an absolute path (e.g. '/home/user/sequences')
75// The directory should be writable by the webserver user
76metagenomics.fileDir = "/home/robert/projects/grails/metagenomics/sequences"
77
78// Path in GSCF that is used after baseURL for adding a new study
79gscf.addStudyPath = "/studyWizard/index?jump=create"
80
81environments { // set per-environment serverURL stem for creating absolute links
82        development {
83                //development Environment (German Server)
84                grails.serverURL = "http://localhost:8184"
85
86                gscf.baseURL = "http://localhost:8080/gscf"
87                //gscf.baseURL = "http://ci.gscf.nmcdsp.org"
88                metagenomics.baseURL = "http://localhost:8184/metagenomics"
89                metagenomics.consumerID = metagenomics.baseURL
90
91                // Turn off synchronization in development mode
92                metagenomics.synchronization = true
93        }
94        ci {
95                //CI Environment (German Server)
96                grails.serverURL = "http://ci.metagenomics.nmcdsp.org"
97                gscf.baseURL = "http://ci.gscf.nmcdsp.org"
98                metagenomics.baseURL = "http://ci.metagenomics.nmcdsp.org"
99                metagenomics.consumerID = metagenomics.baseURL
100        }
101        test {
102                //Test Environment (German Server)
103                grails.serverURL = "http://test.gscf.nmcdsp.org"
104                gscf.baseURL = "http://test.gscf.nmcdsp.org"
105                metagenomics.baseURL = "http://test.metagenomics.nmcdsp.org"
106                metagenomics.consumerID = metagenomics.baseURL
107        }
108        nbx14 {
109                // nbx14 instance
110                grails.serverURL = "http://nbx14.osx.eu"
111                gscf.baseURL = "http://nbx14.osx.eu"
112                metagenomics.baseURL = "http://metagenomics.nbx14.osx.eu"
113                metagenomics.consumerID = metagenomics.baseURL
114        }
115        demo {
116                // demo instance
117                grails.serverURL = "http://demo.nbx14.osx.eu"
118                gscf.baseURL = "http://demo.nbx14.osx.eu"
119                metagenomics.baseURL = "http://demo.metagenomics.nbx14.osx.eu"
120                metagenomics.consumerID = metagenomics.baseURL
121        }
122        production {
123                //Production Environment (German Server)
124                grails.serverURL = "http://www.nmcdsp.org"
125                gscf.baseURL = "http://www.nmcdsp.org"
126                metagenomics.baseURL = "http://metagenomics.nmcdsp.org"
127                metagenomics.consumerID = metagenomics.baseURL
128        }
129        www {
130                //Production Environment used in deploy scripts (German Server)
131                grails.serverURL = "http://metagenomics.nmcdsp.org"
132                gscf.baseURL = "http://www.nmcdsp.org"
133                metagenomics.baseURL = "http://metagenomics.nmcdsp.org"
134                metagenomics.consumerID = metagenomics.baseURL
135        }
136}
137// ##################################################################################
138
139
140// log4j configuration
141log4j = {
142    // Example of changing the log pattern for the default console
143    // appender:
144    //
145    //appenders {
146    //    console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
147    //}
148
149        trace   'grails.app'
150       
151    error  'org.codehaus.groovy.grails.web.servlet',  //  controllers
152           'org.codehaus.groovy.grails.web.pages', //  GSP
153           'org.codehaus.groovy.grails.web.sitemesh', //  layouts
154           'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
155           'org.codehaus.groovy.grails.web.mapping', // URL mapping
156           'org.codehaus.groovy.grails.commons', // core / classloading
157           'org.codehaus.groovy.grails.plugins', // plugins
158           'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
159           'org.springframework',
160           'org.hibernate',
161           'net.sf.ehcache.hibernate'
162
163    warn   'org.mortbay.log'
164}
165
166// jquery plugin
167grails.views.javascript.library = "jquery"
168jquery.version = '1.4.4'
169
170// Include local config to overwrite defaults
171def localConfigFile = "${System.properties['base.dir']}/grails-app/conf/LocalConfig.groovy"
172
173if (new File(localConfigFile)?.canRead()) {
174        grails.config.locations << "file:${localConfigFile}"
175}
Note: See TracBrowser for help on using the repository browser.