# application.yml

api:
  root:
    url: http://api.gbif-dev.org/v1/
  cache:
    purge:
      url: http://api.gbif-dev.org/v1
      threads: 1
portal:
  url: https://www.gbif-dev.org/

occurrence:
  ws:
    url: http://api.gbif-dev.org/v1/occurrence/

#Mail Properties
mail:
  from: @mail.from@
  cc: @mail.cc@
  bcc: @mail.bcc@
  enabled: true
  devemail:
    address: gbifregistry@mailinator.com
    enabled: @mail.devemail.enabled@
message:
  enabled: false

# urlTemplate are formatted using StringFormat (idx 0 = username, 1 = code)
identity:
  surety:
    mail:
      urlTemplate:
        confirmUser: https://demo.gbif-dev.org/{0}/user/confirm?username={1}&code={2}
        resetPassword: https://demo.gbif-dev.org/{0}/user/confirm?username={1}&code={2}
        changeEmail: https://demo.gbif-dev.org/{0}/user/change-email?username={1}&code={2}&email={3}

organization:
  surety:
    mail:
      helpdesk: @mail.helpdesk@
      urlTemplate:
        organization: https://www.demo.gbif-dev.org/publisher/{0}
        confirmOrganization: https://demo.gbif-dev.org/organization/confirm?key={0}&code={1}

application:
  key: gbif.app.it
  secret: a

#GRSCICOLL
grscicoll:
  portal:
    url: https://www.gbif-dev.org/grscicoll/

derivedDataset:
  text: Derived dataset GBIF.org ({0}) Filtered export of GBIF occurrence data https://doi.org/{1}
  cronPattern: 0 0 0 * * *
  url: https://www.gbif-dev.org/derivedDataset/{0}

# JWT
jwt:
  signingKey: 03bee45dc7ecfb7f3bdd1f7171add974947f264c11bd0c37cfdeb0d6da3fd5c6
  expiryTimeInMs: 1800000
  issuer: GBIF-REGISTRY

  # Pipelines properties
pipelines:
  envPrefix: test
  esHost: https://test.com
  doAllThreads: 1

# file with all application keys & secrets
appkeys:
  file: @appkeys.file@
  whitelist: gbif.registry-ws-client-it,gbif.app.it,gbif.portal

# d7dddbf4-2cf0-4f39-9b2a-bb099caae36c is the GBIF Backbone Taxonomy
# comma separated list of UUID
doi:
  url: https://doi.org/
  prefix: 10.21373
  datasetParentExcludeList: d7dddbf4-2cf0-4f39-9b2a-bb099caae36c

# ElasticSearch

elasticsearch:
  registry:
    enabled: false
    hosts: @elasticsearch.registry.hosts@
    index: @elasticsearch.registry.index@
    connectionTimeOut: @elasticsearch.registry.connectionTimeOut@
    socketTimeOut: @elasticsearch.registry.socketTimeOut@
    connectionRequestTimeOut: @elasticsearch.registry.connectionRequestTimeOut@
    maxRetryTimeOut: @elasticsearch.registry.maxRetryTimeOut@
  occurrence:
    enabled: false
    hosts: @elasticsearch.occurrence.hosts@
    index: @elasticsearch.occurrence.index@
    connectionTimeOut: @elasticsearch.occurrence.connectionTimeOut@
    socketTimeOut: @elasticsearch.occurrence.socketTimeOut@
    connectionRequestTimeOut: @elasticsearch.occurrence.connectionRequestTimeOut@
    maxRetryTimeOut: @elasticsearch.occurrence.maxRetryTimeOut@
indexing:
  datasource:
    checklistbank:
      url: @checklistbank-it-spring.db.url@
      username: @checklistbank-it-spring.db.username@
      password: @checklistbank-it-spring.db.password@
      hikari:
        maximumPoolSize: 10
        minimumIdle: 1
        idleTimeout: 60000
        connectionTimeout: 5000

# Database
registry:
  datasource:
    url: @registry-it.db.url@
    password: @registry-it.db.password@
    username: @registry-it.db.username@
    data: classpath:init-db.sql
    hikari:
      idleTimeout: 60000
      maximumPoolSize: 10
      minimumIdle: 1

# GBIF Directory configuration
directory:
  app:
    key: @directory.app.key@
    secret: @directory.app.secret@
  ws:
    url: @directory.ws.url@

# OAI-PMH repositories expose their base URL as the value of the baseURL element in the Identify response
# this value will be used as the baseURL element in the Identify response
oaipmh:
  baseUrl: http://api.gbif-dev.org/v1/oai-pmh/registry
  adminEmail: gbifregistry@mailinator.com

# Spring (messaging, liquibase, mailing)
spring:
  # DOI messaging properties
  # queue 'registry-doi' should be used
  rabbitmq:
    host: @registry.messaging.hostname@
    port: @registry.messaging.port@
    username: @registry.messaging.username@
    password: @registry.messaging.password@
    virtual-host: @registry.messaging.virtualhost@
  # Liquibase
  liquibase:
    change-log: classpath:liquibase/master.xml
    enabled: true
    default-schema: public
  # Mail
  mail:
    default-encoding: UTF-8
    host: @mail.smtp.host@
    username: @mail.username@
    password: @mail.password@
    port: @mail.smtp.port@
    properties:
      mail:
        smtp:
          auth: true
          starttls:
            enable: true
    test-connection: false
