Changeset 1106


Ignore:
Timestamp:
Nov 9, 2010, 2:55:29 PM (10 years ago)
Author:
work@…
Message:
  • added environments used by build scripts (e.g. ci, test and www)
Location:
trunk/grails-app/conf
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/Config.groovy

    r1072 r1106  
    22 * Application Configuration
    33 *
    4  * @author  Jeroen Wesbeek
    5  * @since       20100520
     4 * @author Jeroen Wesbeek
     5 * @since 20100520
    66 *
    77 * Revision information:
     
    2424grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
    2525grails.mime.use.accept.header = false
    26 grails.mime.types = [ html: ['text/html','application/xhtml+xml'],
    27                       xml: ['text/xml', 'application/xml'],
    28                       text: 'text/plain',
    29                       js: 'text/javascript',
    30                       rss: 'application/rss+xml',
    31                       atom: 'application/atom+xml',
    32                       css: 'text/css',
    33                       csv: 'text/csv',
    34                       all: '*/*',
    35                       json: ['application/json','text/json'],
    36                       form: 'application/x-www-form-urlencoded',
    37                       multipartForm: 'multipart/form-data'
    38                     ]
     26grails.mime.types = [html: ['text/html', 'application/xhtml+xml'],
     27        xml: ['text/xml', 'application/xml'],
     28        text: 'text/plain',
     29        js: 'text/javascript',
     30        rss: 'application/rss+xml',
     31        atom: 'application/atom+xml',
     32        css: 'text/css',
     33        csv: 'text/csv',
     34        all: '*/*',
     35        json: ['application/json', 'text/json'],
     36        form: 'application/x-www-form-urlencoded',
     37        multipartForm: 'multipart/form-data'
     38]
    3939// The default codec used to encode data with ${}
    40 grails.views.default.codec="none" // none, html, base64
    41 grails.views.gsp.encoding="UTF-8"
    42 grails.converters.encoding="UTF-8"
     40grails.views.default.codec = "none" // none, html, base64
     41grails.views.gsp.encoding = "UTF-8"
     42grails.converters.encoding = "UTF-8"
    4343
    4444// enabled native2ascii conversion of i18n properties files
     
    4747// set per-environment serverURL stem for creating absolute links
    4848environments {
    49     production {
    50         grails.serverURL = "http://gscf.nmcdsp.org"
    51     }
    52     development {
    53         grails.serverURL = "http://localhost:8080/${appName}"
    54     }
    55     test {
    56         grails.serverURL = "http://localhost:8080/${appName}"
    57     }
    58 
     49        development {
     50                grails.serverURL = "http://localhost:8080/${appName}"
     51        }
     52        ci {
     53                // used by build script
     54                grails.serverURL = "http://ci.gscf.nmcdsp.org"
     55        }
     56        test {
     57                // used by build script
     58                grails.serverURL = "http://test.gscf.nmcdsp.org"
     59        }
     60        production {
     61                grails.serverURL = "http://www.nmcdsp.org"
     62        }
     63        www {
     64                // used by build script
     65                grails.serverURL = "http://www.nmcdsp.org"
     66        }
    5967}
    6068
    6169// log4j configuration
    6270log4j = {
    63     // Example of changing the log pattern for the default console
    64     // appender:
    65     //
    66     //appenders {
    67     //    console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
    68     //}
    69 
    70     error 'org.codehaus.groovy.grails.web.servlet',  //  controllers
    71                'org.codehaus.groovy.grails.web.pages', //  GSP
    72                'org.codehaus.groovy.grails.web.sitemesh', //  layouts
    73                'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
    74                'org.codehaus.groovy.grails.web.mapping', // URL mapping
    75                'org.codehaus.groovy.grails.commons', // core / classloading
    76                'org.codehaus.groovy.grails.plugins', // plugins
    77                'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
    78                'org.springframework',
    79                'org.hibernate'
    80 
    81     warn  'org.mortbay.log'
    82 
    83     //debug 'org.codehaus.groovy.grails.plugins'
     71        // Example of changing the log pattern for the default console
     72        // appender:
     73        //
     74        //appenders {
     75        //    console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
     76        //}
     77
     78        error 'org.codehaus.groovy.grails.web.servlet',  //  controllers
     79                'org.codehaus.groovy.grails.web.pages', //  GSP
     80                'org.codehaus.groovy.grails.web.sitemesh', //  layouts
     81                'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
     82                'org.codehaus.groovy.grails.web.mapping', // URL mapping
     83                'org.codehaus.groovy.grails.commons', // core / classloading
     84                'org.codehaus.groovy.grails.plugins', // plugins
     85                'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
     86                'org.springframework',
     87                'org.hibernate'
     88
     89        warn 'org.mortbay.log'
     90
     91        //debug 'org.codehaus.groovy.grails.plugins'
    8492}
    8593
    8694graphviz {
    87     // graphviz installation path is dependent on OS
    88     // (requirement for class diagram plugin)
    89         switch (System.properties["os.name"]) {
    90             case "Mac OS X":
    91                 // define mac path to Graphviz dot executable
    92                 // (install using macports: sudo port install graphviz)
    93                 dot.executable = "/opt/local/bin/dot"
    94                 break
    95             default:
    96                 // assume the linux default path
    97                 dot.executable = "/usr/bin/dot"
    98         }
     95        // graphviz installation path is dependent on OS
     96        // (requirement for class diagram plugin)
     97        switch (System.properties["os.name"]) {
     98                case "Mac OS X":
     99                        // define mac path to Graphviz dot executable
     100                        // (install using macports: sudo port install graphviz)
     101                        dot.executable = "/opt/local/bin/dot"
     102                        break
     103                default:
     104                        // assume the linux default path
     105                        dot.executable = "/usr/bin/dot"
     106        }
    99107}
    100108
     
    144152                // use: grailsApplication.config.gscf.domain.importableEntities
    145153                // @see ImporterController
    146                 importableEntities: [                   
    147                         event   : [name: 'Event', entity:'dbnp.studycapturing.Event'],                 
    148                         sample  : [name: 'Sample', entity: 'dbnp.studycapturing.Sample'],
    149                         study   : [name: 'Study', entity: 'dbnp.studycapturing.Study'],
    150                         subject : [name: 'Subject', entity: 'dbnp.studycapturing.Subject'],
    151                         samplingevent : [name: 'SamplingEvent', entity: 'dbnp.studycapturing.SamplingEvent']
     154                importableEntities: [
     155                        event: [name: 'Event', entity: 'dbnp.studycapturing.Event'],
     156                        sample: [name: 'Sample', entity: 'dbnp.studycapturing.Sample'],
     157                        study: [name: 'Study', entity: 'dbnp.studycapturing.Study'],
     158                        subject: [name: 'Subject', entity: 'dbnp.studycapturing.Subject'],
     159                        samplingevent: [name: 'SamplingEvent', entity: 'dbnp.studycapturing.SamplingEvent']
    152160
    153161                ]
     
    156164
    157165// jquery plugin
    158 grails.views.javascript.library="jquery"
     166grails.views.javascript.library = "jquery"
    159167
    160168// Needed for the Spring Security Core plugin:
     
    175183// NB: the RegisterController is used for forgotten passwords. It should be accessible by anyone
    176184grails.plugins.springsecurity.controllerAnnotations.staticRules = [
    177     '/user/**': ['ROLE_ADMIN'],
    178     '/role/**': ['ROLE_ADMIN'],
    179     '/aclclass/**': ['ROLE_ADMIN'],
    180     '/aclentry/**': ['ROLE_ADMIN'],
    181     '/aclobjectidentity/**': ['ROLE_ADMIN'],
    182     '/aclsid/**': ['ROLE_ADMIN'],
    183     '/persistentlogin/**': ['ROLE_ADMIN'],
    184     '/registrationcode/**': ['ROLE_ADMIN'],
    185     '/requestmap/**': ['ROLE_ADMIN'],
    186     '/securityinfo/**': ['ROLE_ADMIN']
     185        '/user/**': ['ROLE_ADMIN'],
     186        '/role/**': ['ROLE_ADMIN'],
     187        '/aclclass/**': ['ROLE_ADMIN'],
     188        '/aclentry/**': ['ROLE_ADMIN'],
     189        '/aclobjectidentity/**': ['ROLE_ADMIN'],
     190        '/aclsid/**': ['ROLE_ADMIN'],
     191        '/persistentlogin/**': ['ROLE_ADMIN'],
     192        '/registrationcode/**': ['ROLE_ADMIN'],
     193        '/requestmap/**': ['ROLE_ADMIN'],
     194        '/securityinfo/**': ['ROLE_ADMIN']
    187195]
    188 
    189196
    190197// Needed for sending emails
    191198grails {
    192     mail {
    193         host = "smtp.gmail.com"
    194         port = 465
    195         username = "gscfproject@gmail.com"
    196         password = "gscf2010"
    197         props = [
    198             "mail.smtp.auth":"true",
    199             "mail.smtp.socketFactory.port": '465',
    200             "mail.smtp.socketFactory.class": "javax.net.ssl.SSLSocketFactory",
    201             "mail.smtp.socketFactory.fallback": "false"
    202         ]
    203     }
    204 }
    205 
    206 // The OAuth consumer key and secret variables are currently replaced by Jeroen's Continuous Integration script.
    207 // These keys were requested by me (Tjeerd) from myExperiment.
    208 oauth {
    209         myExperiment {
    210                 requestTokenUrl = 'http://www.myexperiment.org/oauth/request_token'
    211                 accessTokenUrl = 'http://www.myexperiment.org/oauth/access_token'
    212                 authUrl = 'http://www.myexperiment.org/oauth/authorize'
    213                 scope = 'http://example.com/oauth/feed/api/' // Optional - currently required by the Google GData APIs
    214                 consumer.key = '$oauthkey$'
    215                 consumer.secret = '$oauthsecret$'
    216         }
    217 }
    218 
     199        mail {
     200                host = "smtp.gmail.com"
     201                port = 465
     202                username = "gscfproject@gmail.com"
     203                password = "gscf2010"
     204                props = [
     205                        "mail.smtp.auth": "true",
     206                        "mail.smtp.socketFactory.port": '465',
     207                        "mail.smtp.socketFactory.class": "javax.net.ssl.SSLSocketFactory",
     208                        "mail.smtp.socketFactory.fallback": "false"
     209                ]
     210        }
     211}
  • trunk/grails-app/conf/DataSource.groovy

    r776 r1106  
    1414        development {
    1515                dataSource {
    16                         //println "DATASOURCE DEBUG :: user.home = "+System.properties["user.home"]
    17                         switch (System.properties["user.home"]) {
    18                                 case "/Users/adem/TURNEDOFFBYDEFAULT":
    19                                         // Development Postgres Database is turned off by default
    20                                         // if you do want to keep your data you can:
    21                                         //      - reformate 'case' to your user.home (/Users/adem ?)
    22                                         //      - define development data in the BootStrap.groovy instead
    23                                         dbCreate = "update"
    24                                         username = "gscf"
    25                                         password = "dbnp"
    26 
    27                                         // PostgreSQL
    28                                         driverClassName = "org.postgresql.Driver"
    29                                         url = "jdbc:postgresql://localhost:5432/gscf"
    30                                         dialect = org.hibernate.dialect.PostgreSQLDialect
    31                                         break;
    32                                 default:
    33                                         // by default we use an in memory development database
    34                                         dbCreate = "create-drop" // one of 'create', 'create-drop','update'
    35                                         url = "jdbc:hsqldb:mem:devDB"
    36                                         //loggingSql = true
    37                                         break;
    38                         }
     16                        // by default we use an in memory development database
     17                        dbCreate = "create-drop" // one of 'create', 'create-drop','update'
     18                        url = "jdbc:hsqldb:mem:devDB"
     19                        //loggingSql = true
    3920                }
    4021        }
    41         test {
     22        ci {
     23                // used by build script
    4224                dataSource {
    43                         dbCreate = "update"
    44                         url = "jdbc:hsqldb:mem:testDb"
    45                 }
    46         }
    47         production {
    48                 dataSource {
    49                         /*
    50                          * when releasing a new stable to the live environment
    51                          * you would probably comment out the dbCreate option
    52                          * so hibernate won't try to update (which is does not
    53                          * do so well) and you update the live database yourself
    54                          *
    55                          * @see http://grails.org/plugin/autobase
    56                          * @see http://wiki.github.com/RobertFischer/autobase/example-usage
    57                          */
    5825                        dbCreate = "update"
    5926                        username = "gscf"
     
    6229                        // PostgreSQL
    6330                        driverClassName = "org.postgresql.Driver"
    64                         url = "jdbc:postgresql://localhost:5432/gscf"
     31                        url = "jdbc:postgresql://localhost:5432/gscf-ci"
    6532                        dialect = org.hibernate.dialect.PostgreSQLDialect
    6633                        //logSql = true // enable logging while not yet final
     34                }
     35        }
     36        test {
     37                dataSource {
     38                        dbCreate = "update"
     39                        username = "gscf"
     40                        password = "dbnp"
    6741
    68                         /* Apparently Hibernate performs two queries on inserting, one before
    69                          * to generate the unique id, and then the insert itself. In PostgreSQL
    70                          * > 8.2 this behaviour has changed, however hibernate has not implemented
    71                          * this change. In case we might optimize in the future, more info is here:
    72                          * http://blog.wolfman.com/articles/2009/11/11/using-postgresql-with-grails
    73                          * - Jeroen
    74                          */
     42                        // PostgreSQL
     43                        driverClassName = "org.postgresql.Driver"
     44                        url = "jdbc:postgresql://localhost:5432/gscf-test"
     45                        dialect = org.hibernate.dialect.PostgreSQLDialect
     46                        //logSql = true // enable logging while not yet final
     47                }
     48        }
     49        production {
     50                dataSource {
     51                        dbCreate = "update"
     52                        username = "gscf"
     53                        password = "dbnp"
    7554
    76                         // MySQL
    77                         //driverClassName = "com.mysql.jdbc.Driver"
    78                         //url = "jdbc:mysql://localhost/gscf"
    79                         //dialect = "org.hibernate.dialect.MySQL5InnoDBDialect"
     55                        // PostgreSQL
     56                        driverClassName = "org.postgresql.Driver"
     57                        url = "jdbc:postgresql://localhost:5432/gscf-www"
     58                        dialect = org.hibernate.dialect.PostgreSQLDialect
     59                        //logSql = true // enable logging while not yet final
     60                }
     61        }
     62        www {
     63                // used by build script
     64                dataSource {
     65                        dbCreate = "update"
     66                        username = "gscf"
     67                        password = "dbnp"
    8068
    81                         //In memory
    82                         //url = "jdbc:hsqldb:file:prodDb;shutdown=true"
     69                        // PostgreSQL
     70                        driverClassName = "org.postgresql.Driver"
     71                        url = "jdbc:postgresql://localhost:5432/gscf-www"
     72                        dialect = org.hibernate.dialect.PostgreSQLDialect
     73                        //logSql = true // enable logging while not yet final
    8374                }
    8475        }
  • trunk/grails-app/conf/Searchable.groovy

    r776 r1106  
    11/**
    2  * This {@link groovy.util.ConfigObject} script provides Grails Searchable Plugin configuration.
     2 * This  {@link groovy.util.ConfigObject} script provides Grails Searchable Plugin configuration.
    33 *
    44 * You can use the "environments" section at the end of the file to define per-environment
     
    2525searchable {
    2626
    27     /**
    28      * The location of the Compass index
    29      *
    30      * Examples: "/home/app/compassindex", "ram://app-index" or null to use the default
    31      *
    32      * The default is "${user.home}/.grails/projects/${app.name}/searchable-index/${grails.env}"
    33      */
    34     compassConnection = new File(
    35                 ((new File("/home/tomcat").exists()) ? "/home/tomcat/searchable/gscf/compassindex" : "/tmp/searchable/gscf/compassindex")
    36     ).absolutePath
     27        /**
     28         * The location of the Compass index
     29         *
     30         * Examples: "/home/app/compassindex", "ram://app-index" or null to use the default
     31         *
     32         * The default is "${user.home}/.grails/projects/${app.name}/searchable-index/${grails.env}"
     33         */
     34        compassConnection = "${user.home}/.grails/projects/${app.name}/searchable-index/${grails.env}"
    3735
    38     /**
    39      * Any settings you wish to pass to Compass
    40      *
    41      * Use this to configure custom/override default analyzers, query parsers, eg
    42      *
    43      *     Map compassSettings = [
    44      *         'compass.engine.analyzer.german.type': 'German'
    45      *     ]
    46      *
    47      * gives you an analyzer called "german" you can then use in mappings and queries, like
    48      *
    49      *    class Book {
    50      *        static searchable = { content analyzer: 'german' }
    51      *        String content
    52      *    }
    53      *
    54      *    Book.search("unter", analyzer: 'german')
    55      *
    56      * Documentation for Compass settings is here: http://www.compass-project.org/docs/2.1.0M2/reference/html/core-settings.html
    57      */
    58     compassSettings = [:]
     36        /**
     37         * Any settings you wish to pass to Compass
     38         *
     39         * Use this to configure custom/override default analyzers, query parsers, eg
     40         *
     41         *     Map compassSettings = [
     42         *         'compass.engine.analyzer.german.type': 'German'
     43         *     ]
     44         *
     45         * gives you an analyzer called "german" you can then use in mappings and queries, like
     46         *
     47         *    class Book {*        static searchable = { content analyzer: 'german' }*        String content
     48         *}*
     49         *    Book.search("unter", analyzer: 'german')
     50         *
     51         * Documentation for Compass settings is here: http://www.compass-project.org/docs/2.1.0M2/reference/html/core-settings.html
     52         */
     53        compassSettings = [:]
    5954
    60     /**
    61     * Default mapping property exclusions
    62     *
    63     * No properties matching the given names will be mapped by default
    64     * ie, when using "searchable = true"
    65     *
    66     * This does not apply for classes using "searchable = [only/except: [...]]"
    67     * or mapping by closure
    68     */
    69     defaultExcludedProperties = ["password"]
     55        /**
     56        * Default mapping property exclusions
     57        *
     58        * No properties matching the given names will be mapped by default
     59        * ie, when using "searchable = true"
     60        *
     61        * This does not apply for classes using "searchable = [only/except: [...]]"
     62        * or mapping by closure
     63        */
     64        defaultExcludedProperties = ["password"]
    7065
    71     /**
    72     * Default property formats
    73     *
    74     * Value is a Map between Class and format string, eg
    75     *
    76     *     [(Date): "yyyy-MM-dd'T'HH:mm:ss"]
    77     *
    78     * Only applies to class properties mapped as "searchable properties", which are typically
    79     * simple class types that can be represented as Strings (rather than references
    80     * or components) AND only required if overriding the built-in format.
    81     */
    82     defaultFormats = [:]
     66        /**
     67        * Default property formats
     68        *
     69        * Value is a Map between Class and format string, eg
     70        *
     71        *     [(Date): "yyyy-MM-dd'T'HH:mm:ss"]
     72        *
     73        * Only applies to class properties mapped as "searchable properties", which are typically
     74        * simple class types that can be represented as Strings (rather than references
     75        * or components) AND only required if overriding the built-in format.
     76        */
     77        defaultFormats = [:]
    8378
    84     /**
    85     * Set default options for each SearchableService/Domain-class method, by method name.
    86     *
    87     * These can be overriden on a per-query basis by passing the method a Map of options
    88     * containing those you want to override.
    89     *
    90     * You may want to customise the options used by the search method, which are:
    91     *
    92      * @param reload          whether to reload domain class instances from the DB: true|false
    93     *                        If true, the search  will be slower but objects will be associated
    94     *                        with the current Hibernate session
    95      * @param escape          whether to escape special characters in string queries: true|false
    96      * @param offset          the 0-based hit offset of the first page of results.
    97     *                        Normally you wouldn't change it from 0, it's only here because paging
    98     *                        works by using an offset + max combo for a specific page
    99      * @param max            the page size, for paged search results
    100     * @param defaultOperator if the query does not otherwise indicate, then the default operator
    101     *                        applied: "or" or "and".
    102     *                        If "and" means all terms are required for a match, if "or" means
    103     *                        any term is required for a match
    104      * @param suggestQuery    if true and search method is returning a search-result object
    105     *                        (rather than a domain class instance, list or count) then a
    106     *                        "suggestedQuery" property is also added to the search-result.
    107     *                        This can also be a Map of options as supported by the suggestQuery
    108     *                        method itself
    109     *
    110     * For the options supported by other methods, please see the documentation
    111     * http://grails.org/Searchable+Plugin
    112     */
    113     defaultMethodOptions = [
    114         search: [reload: false, escape: false, offset: 0, max: 10, defaultOperator: "and"],
    115         suggestQuery: [userFriendly: true]
    116     ]
     79        /**
     80        * Set default options for each SearchableService/Domain-class method, by method name.
     81        *
     82        * These can be overriden on a per-query basis by passing the method a Map of options
     83        * containing those you want to override.
     84        *
     85        * You may want to customise the options used by the search method, which are:
     86        *
     87         * @param reload whether to reload domain class instances from the DB: true|false
     88        *                        If true, the search  will be slower but objects will be associated
     89        *                        with the current Hibernate session
     90         * @param escape whether to escape special characters in string queries: true|false
     91         * @param offset the 0-based hit offset of the first page of results.
     92        *                        Normally you wouldn't change it from 0, it's only here because paging
     93        *                        works by using an offset + max combo for a specific page
     94         * @param max the page size, for paged search results
     95        * @param defaultOperator if the query does not otherwise indicate, then the default operator
     96        *                        applied: "or" or "and".
     97        *                        If "and" means all terms are required for a match, if "or" means
     98        *                        any term is required for a match
     99         * @param suggestQuery if true and search method is returning a search-result object
     100        *                        (rather than a domain class instance, list or count) then a
     101        *                        "suggestedQuery" property is also added to the search-result.
     102        *                        This can also be a Map of options as supported by the suggestQuery
     103        *                        method itself
     104        *
     105        * For the options supported by other methods, please see the documentation
     106        * http://grails.org/Searchable+Plugin
     107        */
     108        defaultMethodOptions = [
     109                search: [reload: false, escape: false, offset: 0, max: 10, defaultOperator: "and"],
     110                suggestQuery: [userFriendly: true]
     111        ]
    117112
    118     /**
    119     * Should changes made through GORM/Hibernate be mirrored to the index
    120     * automatically (using Compass::GPS)?
    121     *
    122     * If false, you must manage the index manually using index/unindex/reindex
    123     */
    124     mirrorChanges = true
     113        /**
     114        * Should changes made through GORM/Hibernate be mirrored to the index
     115        * automatically (using Compass::GPS)?
     116        *
     117        * If false, you must manage the index manually using index/unindex/reindex
     118        */
     119        mirrorChanges = true
    125120
    126     /**
    127     * Should the database be indexed at startup (using Compass:GPS)?
    128     *
    129     * Possible values: true|false|"fork"
    130     *
    131     * The value may be a boolean true|false or a string "fork", which means true,
    132     * and fork a thread for it
    133     *
    134     * If you use BootStrap.groovy to insert your data then you should use "true",
    135     * which means do a non-forking, otherwise "fork" is recommended
    136     */
    137     bulkIndexOnStartup = true
     121        /**
     122        * Should the database be indexed at startup (using Compass:GPS)?
     123        *
     124        * Possible values: true|false|"fork"
     125        *
     126        * The value may be a boolean true|false or a string "fork", which means true,
     127        * and fork a thread for it
     128        *
     129        * If you use BootStrap.groovy to insert your data then you should use "true",
     130        * which means do a non-forking, otherwise "fork" is recommended
     131        */
     132        bulkIndexOnStartup = true
    138133
    139     /**
    140     * Should index locks be removed (if present) at startup?
    141     */
    142     releaseLocksOnStartup = true
     134        /**
     135        * Should index locks be removed (if present) at startup?
     136        */
     137        releaseLocksOnStartup = true
    143138}
    144139
    145140// per-environment settings
    146141environments {
    147     development {
    148         searchable {
    149             // development is default; inherits from above
    150         }
    151     }
     142        development {
     143                searchable {
     144                        // development is default; inherits from above
     145                        compassConnection = new File(
     146                                ((new File("/home/tomcat").exists()) ? "/home/tomcat/searchable/gscf-dev/compassindex" : "/tmp/searchable/gscf-dev/compassindex")
     147                        ).absolutePath
     148                }
     149        }
     150        ci {
     151                // used by build script
     152                searchable {
     153                        compassConnection = new File(
     154                                ((new File("/home/tomcat").exists()) ? "/home/tomcat/searchable/gscf-ci/compassindex" : "/tmp/searchable/gscf-ci/compassindex")
     155                        ).absolutePath
     156                }
     157        }
     158        test {
     159                // used by build script
     160                searchable {
     161                        // disable bulk index on startup
     162                        //bulkIndexOnStartup = false
    152163
    153     test {
    154         searchable {
    155             // disable bulk index on startup
    156             bulkIndexOnStartup = false
     164                        // use faster in-memory index
     165                        //compassConnection = "ram://test-index"
    157166
    158             // use faster in-memory index
    159             compassConnection = "ram://test-index"
    160         }
    161     }
    162 
    163     production {
    164         searchable {
    165             // add your production settings here
    166         }
    167     }
     167                        compassConnection = new File(
     168                                ((new File("/home/tomcat").exists()) ? "/home/tomcat/searchable/gscf-test/compassindex" : "/tmp/searchable/gscf-test/compassindex")
     169                        ).absolutePath
     170                }
     171        }
     172        production {
     173                searchable {
     174                        // add your production settings here
     175                }
     176        }
     177        www {
     178                // used by build script
     179                searchable {
     180                        // add your production settings here
     181                        compassConnection = new File(
     182                                ((new File("/home/tomcat").exists()) ? "/home/tomcat/searchable/gscf-www/compassindex" : "/tmp/searchable/gscf-www/compassindex")
     183                        ).absolutePath
     184                }
     185        }
    168186}
Note: See TracChangeset for help on using the changeset viewer.