# PostgreSQL configuration (commented out for now, uncomment for production)
spring.datasource.url=jdbc:postgresql://${POSTGIS_HOST:postgis}:${POSTGIS_PORT:5432}/${POSTGIS_DB:reittidb}
spring.datasource.username=${POSTGIS_USER:reitti}
spring.datasource.password=${POSTGIS_PASSWORD:reitti}

spring.thymeleaf.cache=true
logging.level.com.dedicatedcode.reitti=${LOGGING_LEVEL:INFO}

# RabbitMQ Configuration
spring.rabbitmq.host=${RABBITMQ_HOST:rabbitmq}
spring.rabbitmq.port=${RABBITMQ_PORT:5672}
spring.rabbitmq.username=${RABBITMQ_USER:reitti}
spring.rabbitmq.password=${RABBITMQ_PASSWORD:reitti}
spring.rabbitmq.virtual-host=${RABBITMQ_VHOST:/}

spring.data.redis.host=${REDIS_HOST:redis}
spring.data.redis.port=${REDIS_PORT:6379}
spring.data.redis.username=${REDIS_USERNAME:}
spring.data.redis.password=${REDIS_PASSWORD:}

reitti.security.local-login.disable=${DISABLE_LOCAL_LOGIN:false}

reitti.security.oidc.enabled=${OIDC_ENABLED:false}
reitti.security.oidc.registration.enabled=${OIDC_SIGN_UP_ENABLED:true}
spring.security.oauth2.client.registration.oauth.client-id=${OIDC_CLIENT_ID:}
spring.security.oauth2.client.registration.oauth.client-secret=${OIDC_CLIENT_SECRET:}
spring.security.oauth2.client.provider.oauth.issuer-uri=${OIDC_ISSUER_URI:}
spring.security.oauth2.client.registration.oauth.scope=${OIDC_SCOPE:openid,profile}
spring.security.oauth2.client.registration.oauth.client-authentication-method=${OIDC_AUTHENTICATION_METHOD:client_secret_basic}

reitti.server.advertise-uri=${ADVERTISE_URI:}

reitti.data-management.enabled=${DANGEROUS_LIFE:false}

reitti.import.processing-idle-start-time=${PROCESSING_WAIT_TIME:15}

reitti.geocoding.photon.base-url=${PHOTON_BASE_URL:}

reitti.process-data.schedule=${REITTI_PROCESS_DATA_CRON:0 */10 * * * *}

reitti.ui.tiles.custom.service=${CUSTOM_TILES_SERVICE:}
reitti.ui.tiles.custom.attribution=${CUSTOM_TILES_ATTRIBUTION:}

reitti.import.batch-size=${PROCESSING_BATCH_SIZE:1000}
reitti.events.concurrency=${PROCESSING_WORKERS_PER_QUEUE:4-16}

reitti.storage.path=/data/

logging.level.root = INFO
