---
hibernate:
    cache:
        queries: false
        use_second_level_cache: true
        use_query_cache: false
        region.factory_class: 'org.hibernate.cache.ehcache.EhCacheRegionFactory'

dataSource:
    pooled: true
    jmxExport: true
    driverClassName: org.h2.Driver
    username: sa
    password:

endpoints:
    enabled: false

quartz:
    autoStartup: true
    jdbcStore: false
    waitForJobsToCompleteOnShutdown: false

application:
    bottleSize: 750ml
    output:
        encoding: Windows-1252
        lineTerminator: CRLF
    validation.price:
        active: true
        allowedMargin: 10.0

server:
    session:
        timeout: 0
    port: 8081 

environments:
    development:
        dataSources:
            dataSource:
                pooled: true
                dbCreate: update
                dialect: dbdialect.MySQLUTF8InnoDBDialect
                driverClassName: com.mysql.cj.jdbc.Driver
                username: root
                password:
                url: jdbc:mysql://127.0.0.1:3306/winealert?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
                logSql: false
                formatSql: true
                properties:
                    dbProperties:
                        autoReconnect: true
                        zeroDateTimeBehavior: convertToNull
            wineDatabase:
                pooled: true
                dbCreate: update
                dialect: dbdialect.MySQLUTF8InnoDBDialect
                driverClassName: com.mysql.cj.jdbc.Driver
                username: root
                password:
                url: jdbc:mysql://127.0.0.1:3306/winedb?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
                logSql: false
                formatSql: true
                properties:
                    dbProperties:
                        autoReconnect: true
                        zeroDateTimeBehavior: convertToNull
        application:
            api:
                wine-data:
                    token: m8bHr-UyCS2-pKLxS-nisCp
                    url:
                        index-wines: http://localhost:5001/wine/core/api/index_wines_by_ids
                wine-recognition:
                    token: 7FLSDLraXBZUGpaKAVXc845oWnCWXsX8XmL1QjpFraUkGjXI9v
                    url:
                        approve: http://localhost:8081/api/v1/approve/
                        data-img: http://ec2-52-23-203-121.compute-1.amazonaws.com/data/images/
                        temp-img: http://ec2-52-23-203-121.compute-1.amazonaws.com/temp/images/
                        undo: http://localhost:8081/api/v1/undo/
            archive.location: /var/www/html/winematch-dev/Workspace/files/winealert/archive
            config:
                backupLocation: /var/www/html/winematch-dev/Workspace/files/winealert/backup/config
                location: /var/www/html/winematch-dev/Workspace/files/winealert/config
            crawlOut:
                backupLocation: /var/www/html/winematch-dev/Workspace/files/winealert/backup/input
                location: /var/www/html/winematch-dev/Workspace/files/winealert/input
            cronServer:
                sftpHost: "cronstage.robertparker.com"
                sftpUsername: "winealert"
                sftpPassword: ""
                workingDir: "/home/winealert/request-folder/retailerTastingNotes/"
            download.location: /var/www/html/winematch-dev/Workspace/files/winealert/download
            fixer:
                apiKey: 37e1ab75cb47df41ce3f8de9e1e54b8f
                url: "http://data.fixer.io/api/latest?&access_key={apiKey}"
            history:
                backupLocation: /var/www/html/winematch-dev/Workspace/files/winealert/backup/history
                location: /var/www/html/winematch-dev/Workspace/files/winealert/history
            matched:
                backupLocation: /var/www/html/winematch-dev/Workspace/files/winealert/backup/matched
                location: /var/www/html/winematch-dev/Workspace/files/winealert/matched
            s3bucket:
                path:
                    rollup: rollup
            matcher.maxThreads: 60
            tastingNotes:
                sftpHost: "uploadstage.winealert.com"
                sftpUsername: "ftdev"
                sftpPassword: ""
                workingDir: "/local/"

    test:
        dataSources:
            dataSource:
                dbCreate: update
                url: jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
            wineDatabase:
                dbCreate: update
                url: jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
        application:
            archive.location: /var/www/html/winematch-dev/Workspace/files/winealert/test/archive
            config:
                backupLocation: /var/www/html/winematch-dev/Workspace/files/winealert/backup/config
                location: /var/www/html/winematch-dev/Workspace/files/winealert/config
            crawlOut:
                backupLocation: /var/www/html/winematch-dev/Workspace/files/winealert/test/backup/input
                location: /var/www/html/winematch-dev/Workspace/files/winealert/input
            download.location: /var/www/html/winematch-dev/Workspace/files/winealert/download
            fixer:
                apiKey: 37e1ab75cb47df41ce3f8de9e1e54b8f
                url: "http://data.fixer.io/api/latest?&access_key={apiKey}"
            history:
                backupLocation: /var/www/html/winematch-dev/Workspace/files/winealert/test/backup/history
                location: /var/www/html/winematch-dev/Workspace/files/winealert/history
            matched:
                backupLocation: /var/www/html/winematch-dev/Workspace/files/winealert/test/backup/matched
                location: /var/www/html/winematch-dev/Workspace/files/winealert/matched
            s3bucket:
                path:
                    rollup: rollup
            matcher.maxThreads: 60

---
---
grails:
    profile: web
    codegen:
        defaultPackage: wine.alert
    spring:
        transactionManagement:
            proxies: false
info:
    app:
        name: '@info.app.name@'
        version: '@info.app.version@'
        grailsVersion: '@info.app.grailsVersion@'
spring:

    groovy:
        template:
            check-template-location: false

---
grails:
    mime:
        disable:
            accept:
                header:
                    userAgents:
                        - Gecko
                        - WebKit
                        - Presto
                        - Trident
        types:
            all: '*/*'
            atom: application/atom+xml
            css: text/css
            csv: text/csv
            form: application/x-www-form-urlencoded
            html:
              - text/html
              - application/xhtml+xml
            js: text/javascript
            json:
              - application/json
              - text/json
            multipartForm: multipart/form-data
            pdf: application/pdf
            rss: application/rss+xml
            text: text/plain
            hal:
              - application/hal+json
              - application/hal+xml
            xml:
              - text/xml
              - application/xml
            xlsx:
              - application/vnd.ms-excel
    urlmapping:
        cache:
            maxsize: 1000
    controllers:
        defaultScope: singleton
        upload:
            maxFileSize: 26214400 # 25MB
            maxRequestSize: 26214400
    converters:
        encoding: UTF-8
    views:
        default:
            codec: html
        gsp:
            encoding: UTF-8
            htmlcodec: xml
            codecs:
                expression: html
                scriptlets: html
                taglib: none
                staticparts: none
    plugin:
        springsecurity:
            password.algorithm: 'bcrypt'
            userLookup.userDomainClassName: 'wine.alert.User'
            userLookup.authorityJoinClassName: 'wine.alert.UserRole'
            authority.className: 'wine.alert.Role'
            logout.postOnly: false
            logout.afterLogoutUrl: "/"
            securityConfigType: "Annotation"

            controllerAnnotations.staticRules:
                - pattern: '/assets/**'
                  access: ['permitAll']
                - pattern: '/**/js/**'
                  access: ['permitAll']
                - pattern: '/**/css/**'
                  access: ['permitAll']
                - pattern: '/**/images/**'
                  access: ['permitAll']
                - pattern: '/**/favicon.ico'
                  access: ['permitAll']
                - pattern: '/login/**'
                  access: ['permitAll']
                - pattern: '/logout/**'
                  access: ['permitAll']
                - pattern: '/logoff/**'
                  access: ['permitAll']

        awssdk:
            accessKey: access-key # Global default setting
            secretKey: x_____x # Global default setting
            region: ap-southeast-1 # Global default setting
            s3:
                bucket: winematch-development

endpoints:
    jmx:
        unique-names: true

