application.version: ${version}

logging:
  logback:
    rollingpolicy:
      max-history: 7
      total-size-cap: 1GB
      clean-history-on-start: true
      max-file-size: 10MB
  file:
    name: \${komga.config-dir}/logs/komga.log
  level:
    org.apache.activemq.audit: WARN

komga:
  database:
    file: \${komga.config-dir}/database.sqlite
  lucene:
    data-directory: \${komga.config-dir}/lucene
  config-dir: \${user.home}/.komga

spring:
  flyway:
    enabled: true
    locations: classpath:db/migration/{vendor}
    mixed: true
    placeholders:
      library-file-hashing: \${komga.file-hashing:true}
      library-scan-startup: \${komga.libraries-scan-startup:false}
      delete-empty-collections: \${komga.delete-empty-collections:true}
      delete-empty-read-lists: \${komga.delete-empty-read-lists:true}
  thymeleaf:
    prefix: classpath:/public/
  mvc:
    throw-exception-if-no-handler-found: true
    async:
      request-timeout: 1h
  artemis:
    broker-url: tcp://localhost:18515
    embedded:
      persistent: true
      data-directory: \${komga.config-dir}/artemis
  web:
    resources:
      add-mappings: false
  jackson:
    deserialization:
      FAIL_ON_NULL_FOR_PRIMITIVES: true
  config:
    import:
      - "optional:file:\${komga.config-dir}/application.yml"
      - "optional:file:\${komga.config-dir}/application.yaml"
      - "optional:file:\${komga.config-dir}/application.properties"

server:
  servlet.session.timeout: 7d
  forward-headers-strategy: framework
  shutdown: graceful
  error:
    include-message: always
  port: 25600

management:
  endpoints.web.exposure.include: "*"
  endpoint:
    configprops:
      roles: ADMIN
      show-values: when_authorized
    env:
      roles: ADMIN
      show-values: when_authorized
    health:
      roles: ADMIN
      show-details: when_authorized
    shutdown:
      enabled: true
  info:
    java:
      enabled: true
    os:
      enabled: true
  simple:
    metrics:
      export:
        enabled: true
        step: 24h
springdoc:
  group-configs:
    - group: REST API
      paths-to-match: /api/**
    - group: OPDS
      paths-to-match: /opds/**
  swagger-ui:
    groups-order: desc
    operations-sorter: alpha
    disable-swagger-default-url: true
