source: branches/features/purchaseOrders/gnuMims-config.groovy

Last change on this file was 946, checked in by gav, 13 years ago

Svn merge -r942:r945 trunk/ into branches/features/purchaseOrders.
This brings the purchaseOrder branch fully up to date.

File size: 3.4 KB
Line 
1/**
2 * External application config file.
3 * This is a full Groovy ConfigSlurper file but don't let that scare you :-)
4 * Normally just set your database settings in the Required Settings section.
5 * Usage:
6 *  This file must be placed on the classpath, for example in ONE of the following:
7 *   $CATALINA_BASE/lib/
8 *   $CATALINA_HOME/lib/
9 *   /var/lib/tomcat5.5/common/lib/ (Debian Tomcat5.5)
10 *   /var/lib/tomcat6/common/classes/ (Debian Tomcat6)
11 *   or in the root of a grails application (development).
12 * More:
13 *  Grails user guide - 3.3 The DataSource and 3.4 Externalized Configuration
14 *  http://grails.org/doc/latest/guide/
15 *  http://groovy.codehaus.org/ConfigSlurper
16 */
17
18/*******************
19Init, please ignore.
20*******************/
21def appName = grails.util.Metadata.current.'app.name'
22def appNameLowerCase = appName.toLowerCase()
23println "EXT($appName): External config start."
24
25/***********************************
26Required Settings, please set these.
27************************************/
28
29environments {
30    production {
31        println "EXT($appName): Configure production datasource."
32
33        // Enable ONE dataSource with your database settings.
34        // Delete dbCreate line after setup!
35        dataSource {
36            /** HSQLDB - In memory */
37//             driverClassName = "org.hsqldb.jdbcDriver"
38//             username = "sa"
39//             password = ""
40//             dbCreate = "create-drop"
41//             url = "jdbc:hsqldb:mem:devDb"
42            /** HSQLDB - In file */
43//             driverClassName = "org.hsqldb.jdbcDriver"
44//             username = "sa"
45//             password = ""
46//             dbCreate = "update"
47//             url = "jdbc:hsqldb:file:prodDb;shutdown=true"
48            /** MSSQL */
49            //For more info see the docs that you downloaded with the driver.
50//             dialect = org.hibernate.dialect.SQLServerDialect // MSSQL 2000+2005 Useful with `grails schema-export`
51//             driverClassName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
52//             username = "${appNameLowerCase}admin"
53//             password = "${appNameLowerCase}admin"
54//             dbCreate = "update"
55//             url = "jdbc:sqlserver://sql01:1433;databaseName=${appNameLowerCase}_prod"
56            /** MySQL */
57            dialect = org.hibernate.dialect.MySQL5InnoDBDialect
58            driverClassName = "com.mysql.jdbc.Driver"
59            username = "${appNameLowerCase}admin"
60            password = "${appNameLowerCase}admin"
61            dbCreate = "update"
62            url = "jdbc:mysql://sql01:3306/${appNameLowerCase}_prod?autoReconnect=true&sessionVariables=storage_engine=InnoDB"
63        }
64    }
65}
66
67// It is highly recommended to limit the currencyList to the ONE that the site uses e.g:
68// 'EUR', 'XCD', 'USD', 'XOF', 'NOK', 'AUD', 'XAF', 'TRL'
69// 'NZD', 'MAD', 'DKK', 'GBP', 'CHF', 'XPF', 'ILS', 'ROL'
70currencyList = ['AUD']
71
72/*******************
73Optional Settings.
74*******************/
75
76// Set true to enable demo mode and create demo data.
77demoMode.enabled = false
78
79// Task generation interval, increase value to reduce system load.
80taskRecurringScheduleJob.repeatInterval = 10
81
82/*******************
83Exit Functions.
84*******************/
85
86if(demoMode.enabled) {
87    println "EXT($appName): Demo mode enabled."
88    currencyList = ['EUR', 'XCD', 'USD', 'XOF', 'NOK', 'AUD', 'XAF', 'TRL',
89                    'NZD', 'MAD', 'DKK', 'GBP', 'CHF', 'XPF', 'ILS', 'ROL']
90}
91
92println "EXT($appName): External config end."
Note: See TracBrowser for help on using the repository browser.