# Storage
%prod.quarkus.datasource.db-kind=h2
%prod.quarkus.datasource.jdbc.url=${REGISTRY_DATASOURCE_URL:jdbc:h2:mem:registry_db}
%prod.quarkus.datasource.username=${REGISTRY_DATASOURCE_USERNAME:sa}
%prod.quarkus.datasource.password=${REGISTRY_DATASOURCE_PASSWORD:sa}
%prod.quarkus.datasource.jdbc.initial-size=20
%prod.quarkus.datasource.jdbc.min-size=20
%prod.quarkus.datasource.jdbc.max-size=100
%prod.registry.sql.init=true

# Readiness and Liveness
%prod.registry.metrics.PersistenceExceptionLivenessCheck.errorThreshold=${LIVENESS_ERROR_THRESHOLD:5}
%prod.registry.metrics.PersistenceExceptionLivenessCheck.counterResetWindowDurationSec=${LIVENESS_COUNTER_RESET:30}
%prod.registry.metrics.PersistenceExceptionLivenessCheck.statusResetWindowDurationSec=${LIVENESS_STATUS_RESET:60}
%prod.registry.metrics.ResponseErrorLivenessCheck.errorThreshold=${LIVENESS_ERROR_THRESHOLD:5}
%prod.registry.metrics.ResponseErrorLivenessCheck.counterResetWindowDurationSec=${LIVENESS_COUNTER_RESET:30}
%prod.registry.metrics.ResponseErrorLivenessCheck.statusResetWindowDurationSec=${LIVENESS_STATUS_RESET:60}

%prod.registry.metrics.PersistenceTimeoutReadinessCheck.errorThreshold=${READINESS_ERROR_THRESHOLD:5}
%prod.registry.metrics.PersistenceTimeoutReadinessCheck.counterResetWindowDurationSec=${READINESS_COUNTER_RESET:30}
%prod.registry.metrics.PersistenceTimeoutReadinessCheck.statusResetWindowDurationSec=${READINESS_STATUS_RESET:60}
%prod.registry.metrics.PersistenceTimeoutReadinessCheck.timeoutSec=${READINESS_TIMEOUT:10}
%prod.registry.metrics.ResponseTimeoutReadinessCheck.errorThreshold=${READINESS_ERROR_THRESHOLD:5}
%prod.registry.metrics.ResponseTimeoutReadinessCheck.counterResetWindowDurationSec=${READINESS_COUNTER_RESET:30}
%prod.registry.metrics.ResponseTimeoutReadinessCheck.statusResetWindowDurationSec=${READINESS_STATUS_RESET:60}
%prod.registry.metrics.ResponseTimeoutReadinessCheck.timeoutSec=${READINESS_TIMEOUT:20}

%prod.registry.liveness.errors.ignored=${LIVENESS_ERRORS_IGNORED:}

# Eventing
%prod.registry.events.ksink=${K_SINK:}
%prod.registry.events.kafka.config.bootstrap.servers=${KAFKA_BOOTSTRAP_SERVERS:}
%prod.registry.events.kafka.config.enable.idempotence=true
%prod.registry.events.kafka.config.retries=3
%prod.registry.events.kafka.config.acks=all

# UI Config
%prod.registry.ui.config.apiUrl=${REGISTRY_UI_CONFIG_APIURL:_}
%prod.registry.ui.config.uiContextPath=${REGISTRY_UI_CONFIG_UI_CONTEXT_PATH:/ui/}

# Log
%prod.quarkus.log.level=${LOG_LEVEL:INFO}
%prod.quarkus.log.console.enable=true
%prod.quarkus.log.category."io.apicurio".level=${REGISTRY_LOG_LEVEL:INFO}

# === Prod profile - see README
# HTTP Port
%prod.quarkus.http.port=${HTTP_PORT:8080}
%prod.quarkus.package.jar.type=legacy-jar

# Metrics
%prod.quarkus.micrometer.enabled=true
%prod.quarkus.micrometer.binder.http-server.enabled=false
%prod.quarkus.micrometer.binder.http-client.enabled=false
%prod.quarkus.micrometer.export.prometheus.enabled=true
%prod.quarkus.datasource.metrics.enabled=true
%prod.quarkus.datasource.jdbc.enable-metrics=true

# Dynamic logging configuration
%prod.registry.logconfigjob.every=30s
%prod.registry.logconfigjob.delayed=15s

# Reaper
%prod.registry.multitenancy.reaper.every=60s
%prod.app.multitenancy.reaper.every=${registry.multitenancy.reaper.every}

#Multitenancy
%prod.registry.enable.multitenancy=false

