
# Server configuration
server.port=8080

server.forward-headers-strategy=framework

# Logging configuration

logging.level.root = INFO
logging.level.org.hibernate.engine.jdbc.spi.SqlExceptionHelper = FATAL
logging.level.com.dedicatedcode.reitti = INFO

# Internationalization
spring.messages.basename=messages
spring.messages.encoding=UTF-8
spring.messages.cache-duration=3600
spring.messages.fallback-to-system-locale=false

# PostgreSQL configuration
spring.datasource.url=jdbc:postgresql://localhost:5432/reittidb
spring.datasource.username=reitti
spring.datasource.password=reitti

#Redis configuration
spring.data.redis.host=localhost
spring.data.redis.port=6379
spring.data.redis.username=
spring.data.redis.password=

# RabbitMQ Configuration
spring.rabbitmq.host=localhost
spring.rabbitmq.port=5672
spring.rabbitmq.username=reitti
spring.rabbitmq.password=reitti
spring.rabbitmq.virtual-host=/

spring.rabbitmq.listener.simple.retry.enabled=true
spring.rabbitmq.listener.simple.retry.initial-interval=1000ms
spring.rabbitmq.listener.simple.retry.max-attempts=4
spring.rabbitmq.listener.simple.retry.multiplier=2
spring.rabbitmq.listener.simple.retry.max-interval=10000ms
spring.rabbitmq.listener.simple.prefetch=10
# CRITICAL FOR DEAD-LETTERING:
# After all retries are exhausted, do NOT requeue the message.
# Setting this to 'false' causes the listener container to send a NACK (negative acknowledgment)
# to RabbitMQ, which then triggers the dead-letter-exchange (DLX) policy on the queue.
spring.rabbitmq.listener.simple.default-requeue-rejected=false

spring.cache.cache-names=processed-visits,significant-places,users,magic-links,configurations,transport-mode-configs
spring.cache.redis.time-to-live=1d

# Upload configuration
spring.servlet.multipart.max-file-size=5GB
spring.servlet.multipart.max-request-size=5GB
server.tomcat.max-part-count=100


# Application specific settings
reitti.server.advertise-uri=

reitti.security.local-login.disable=false

# OAuth configuration
# For now, we only support having one OIDC provider. If you need multiple, create a ticket in the reitti github.
reitti.security.oidc.enabled=false
reitti.security.oidc.registration.enabled=true

reitti.import.batch-size=1000
# How many seconds should we wait after the last data input before starting to process all unprocessed data?
reitti.import.processing-idle-start-time=15

reitti.events.concurrency=1-16

reitti.geo-point-filter.max-speed-kmh=1000
reitti.geo-point-filter.max-accuracy-meters=200
reitti.geo-point-filter.max-distance-jump-meters=5000

reitti.process-data.schedule=0 */10 * * * *
reitti.imports.schedule=0 5/10 * * * *

reitti.imports.owntracks-recorder.schedule=${reitti.imports.schedule}
# Geocoding service configuration
reitti.geocoding.max-errors=10

# Geocoding fixed service configuration
reitti.geocoding.photon.base-url=

# Tiles Configuration
reitti.ui.tiles.default.service=https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png
reitti.ui.tiles.default.attribution=&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>

# You can set custom tiles service and attribution by uncommenting the next two keys and setting them to appropriate values
#reitti.ui.tiles.custom.service=
#reitti.ui.tiles.custom.attribution=

# Data management configuration
reitti.data-management.enabled=false
reitti.data-management.preview-cleanup.cron=0 0 4 * * *

reitti.storage.path=data/
reitti.storage.cleanup.cron=0 0 4 * * *

# For OIDC security configuration, create a separate oidc.properties file instead of configuring OIDC settings directly in this file. See the oidc.properties.example for the needed properties.
spring.config.import=optional:oidc.properties

