server:
  port: 8000

spring:
  threads:
    virtual:
      enabled: true

  datasource:
    url: jdbc:oracle:thin:@${ORACLE_DSN}
    username: ${ORACLE_USER}
    password: ${ORACLE_PASSWORD}
    driver-class-name: oracle.jdbc.OracleDriver
    hikari:
      minimum-idle: 2
      maximum-pool-size: 10
      connection-timeout: 30000
      idle-timeout: 600000
      max-lifetime: 1800000
      pool-name: TastebyHikariPool
      connection-init-sql: "SELECT 1 FROM DUAL"

  data:
    redis:
      host: ${REDIS_HOST:192.168.0.147}
      port: ${REDIS_PORT:6379}
      database: ${REDIS_DB:0}
      timeout: 2000ms

  jackson:
    default-property-inclusion: non_null
    property-naming-strategy: SNAKE_CASE
    serialization:
      write-dates-as-timestamps: false

app:
  jwt:
    secret: ${JWT_SECRET:tasteby-dev-secret-change-me}
    expiration-days: 7

  cors:
    allowed-origins: http://localhost:3000,http://localhost:3001,https://www.tasteby.net,https://tasteby.net,https://dev.tasteby.net

  oracle:
    wallet-path: ${ORACLE_WALLET:}

  oci:
    compartment-id: ${OCI_COMPARTMENT_ID}
    chat-endpoint: ${OCI_CHAT_ENDPOINT:https://inference.generativeai.us-ashburn-1.oci.oraclecloud.com}
    embed-endpoint: ${OCI_GENAI_ENDPOINT:https://inference.generativeai.us-chicago-1.oci.oraclecloud.com}
    chat-model-id: ${OCI_CHAT_MODEL_ID}
    embed-model-id: ${OCI_EMBED_MODEL_ID:cohere.embed-v4.0}

  google:
    maps-api-key: ${GOOGLE_MAPS_API_KEY}
    youtube-api-key: ${YOUTUBE_DATA_API_KEY}
    client-id: ${GOOGLE_CLIENT_ID:635551099330-2l003d3ernjmkqavd4f6s78r8r405iml.apps.googleusercontent.com}

  cache:
    ttl-seconds: 600

  search:
    # #293 — 벡터 검색 cosine distance 임계값 (0.0=완전일치, 1.0=직교).
    # 0.57은 cohere embed-v4 한국어 시맨틱 적합도 기준 경험값.
    max-distance: ${SEARCH_MAX_DISTANCE:0.57}

  build:
    # #338 — 배포 시 deploy.sh가 env로 주입. dev에서는 dev/unknown.
    version: ${APP_VERSION:dev}
    commit: ${APP_COMMIT:unknown}

  daemon:
    # 인스턴스 차원 스케줄러 활성화. dev/prod가 같은 DB를 공유하므로
    # dev .env에 DAEMON_ENABLED=false를 설정해 dev 폴링을 끄고 prod만 동작시킨다.
    enabled: ${DAEMON_ENABLED:true}

mybatis:
  mapper-locations: classpath:mybatis/mapper/*.xml
  config-location: classpath:mybatis/mybatis-config.xml
  type-aliases-package: com.tasteby.domain
  type-handlers-package: com.tasteby.config

logging:
  level:
    com.tasteby: DEBUG
    com.tasteby.mapper: DEBUG
