spring:
  application:
    name: content-service

  # Redis Configuration
  data:
    redis:
      enabled: ${REDIS_ENABLED:true}
      host: ${REDIS_HOST:20.214.210.71}
      port: ${REDIS_PORT:6379}
      password: ${REDIS_PASSWORD:Hi5Jessica!}
      timeout: ${REDIS_TIMEOUT:2000ms}
      lettuce:
        pool:
          max-active: ${REDIS_POOL_MAX:8}
          max-idle: ${REDIS_POOL_IDLE:8}
          min-idle: ${REDIS_POOL_MIN:0}
          max-wait: ${REDIS_POOL_WAIT:-1ms}
      database: ${REDIS_DATABASE:0}

# JWT Configuration
jwt:
  secret: ${JWT_SECRET:kt-event-marketing-jwt-secret-key-for-authentication-and-authorization-2025}
  access-token-validity: ${JWT_ACCESS_TOKEN_VALIDITY:3600000}
  refresh-token-validity: ${JWT_REFRESH_TOKEN_VALIDITY:604800000}

# Azure Blob Storage Configuration
azure:
  storage:
    connection-string: ${AZURE_STORAGE_CONNECTION_STRING:DefaultEndpointsProtocol=https;AccountName=blobkteventstorage;AccountKey=tcBN7mAfojbl0uGsOpU7RNuKNhHnzmwDiWjN31liSMVSrWaEK+HHnYKZrjBXXAC6ZPsuxUDlsf8x+AStd++QYg==;EndpointSuffix=core.windows.net}
    container-name: ${AZURE_CONTAINER_NAME:content-images}

# Replicate API Configuration (Stable Diffusion)
replicate:
  api:
    url: ${REPLICATE_API_URL:https://api.replicate.com}
    token: ${REPLICATE_API_TOKEN:}
  model:
    version: ${REPLICATE_MODEL_VERSION:stability-ai/sdxl:39ed52f2a78e934b3ba6e2a89f5b1c712de7dfea535525255b1aa35c5565e08b}
  mock:
    enabled: ${REPLICATE_MOCK_ENABLED:true}

# CORS Configuration
cors:
  allowed-origins: ${CORS_ALLOWED_ORIGINS:http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:8084,http://kt-event-marketing.20.214.196.128.nip.io}
  allowed-methods: ${CORS_ALLOWED_METHODS:GET,POST,PUT,DELETE,OPTIONS,PATCH}
  allowed-headers: ${CORS_ALLOWED_HEADERS:*}
  allow-credentials: ${CORS_ALLOW_CREDENTIALS:true}
  max-age: ${CORS_MAX_AGE:3600}

# Actuator
management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics,prometheus
      base-path: /actuator
  endpoint:
    health:
      show-details: always
      show-components: always
  health:
    livenessState:
      enabled: true
    readinessState:
      enabled: true

# OpenAPI Documentation
springdoc:
  api-docs:
    path: /v3/api-docs
  swagger-ui:
    path: /swagger-ui.html
    tags-sorter: alpha
    operations-sorter: alpha
  show-actuator: false

# Logging
logging:
  level:
    com.kt.event.content: ${LOG_LEVEL_APP:DEBUG}
    org.springframework.web: ${LOG_LEVEL_WEB:INFO}
    root: ${LOG_LEVEL_ROOT:INFO}
  pattern:
    console: "%d{yyyy-MM-dd HH:mm:ss} - %msg%n"
    file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
  file:
    name: ${LOG_FILE_PATH:logs/content-service.log}
  logback:
    rollingpolicy:
      max-file-size: ${LOG_FILE_MAX_SIZE:10MB}
      max-history: ${LOG_FILE_MAX_HISTORY:7}
      total-size-cap: ${LOG_FILE_TOTAL_CAP:100MB}

# Server Configuration
server:
  port: ${SERVER_PORT:8084}
  servlet:
    context-path: /api/v1/content
