spring:
  application:
    name: tsi-comm-server
  profiles:
    active: prod
#  config:
#    import:
#      - optional:file:${user.dir}/conf/tsi-comm-server.yml
#  main:
#    web-application-type: none

  datasource:
    hikari:
      platform: mariadb
      driver-class-name: org.mariadb.jdbc.Driver
      username: cvim
      password: 44Klctest$$
      pool-name: pool-tsi-comm-server
      maximum-pool-size: 30
      minimum-idle: 2

  data:
    mongodb:
      authentication-database: ssip
      username: ssip
      password: 44Klctest$$
      database: ssip

management:
  endpoint:
    health:
      show-details: always
  endpoints:
    prometheus:
      enabled: true
    web:
      exposure:
        include: "*"
  security:
    enabled: false

server:
  port: 9871
  shutdown: graceful
  tomcat:
    connection-timeout: 5000         # 연결 대기 시간 5초
    keep-alive-timeout: 0            # 응답 후 바로 연결 종료
    max-keep-alive-requests: 1       # 한 연결당 1회 요청만 허용
    threads:
      max: 5        # 톰캣 최대 스레드 수 설정
      min-spare: 2  # 초기 여유 스레드 수
    accesslog:
      enabled: false            # 액세스 로그 활성화 여부
  error:
    whitelabel:
      enabled: true
    include-exception: false
    include-stacktrace: never

logging:
  file:
    path: ${user.home}/logs/tsi-comm-server/

# Application Configure
application:
  process-id: tsi-comm-server
  thread-pool:
    pool-core: 1
  scheduling:
    pool-size: 10

  cvim-server:
    server-id: 0
    binding-addr:
    binding-port: 9091
    backlog: 0
    accept-threads: 0
    worker-threads: 0
    rcv-buf: 0
    snd-buf: 0
    reader-idle-time-seconds: 0
    writer-idle-time-seconds: 0
    all-idle-time-seconds: 0
    connect-timeout-seconds: 0
    packet-workers: 0
    logging-workers: 0
    dbms-workers: 1
    white-list-ips:
      -
  kafka:
    producer:
      consumer-group-id: tsi-comm-server
      consumer-ack-config: 1
      multi-connect: false
      props:
      #  - request.timeout.ms: 100
      #  - max.block.ms: 100
      #  - transactional.id: tsi-comm-server-01
      #  - acks: 0
      #  - retries: 0
      #  - linger.ms: 1
      cvim-servers:
      node-servers:
      test-servers:
      enable-cvim: true
      enable-node: true
      enable-test: true

---
spring:
  config:
    activate:
      on-profile: prod
    import:
      - optional:file:${user.dir}/conf/tsi-comm-server.yml
  datasource:
    hikari:
      #jdbc-url: jdbc:mariadb://10.4.4.20:3306/cvim_db?characterEncoding=UTF-8&serverTimezone=Asia/Seoul
      jdbc-url: jdbc:mariadb:failover://10.4.4.20:4006,10.4.4.21:4006/cvim_db?characterEncoding=UTF-8&serverTimezone=Asia/Seoul&connectTimeout=3000&socketTimeout=6000&failoverEnable=true&failoverReadOnly=false

  data:
    mongodb:
      host: 172.24.0.40
      port: 27017

application:
  kafka:
    producer:
      bootstrap-servers: 172.24.0.30:9092,172.24.0.31:9093,172.24.0.32:9094

---
spring:
  config:
    activate:
      on-profile: dev
    import:
      - optional:file:${user.dir}/conf/tsi-comm-server-dev.yml
  datasource:
    hikari:
      jdbc-url: jdbc:mariadb://115.91.94.42:13306/cvim_db?characterEncoding=UTF-8&serverTimezone=Asia/Seoul
      username: cvim
      password: 44Klctest$$

  data:
    mongodb:
      host: 172.24.0.40
      port: 27017

application:
  kafka:
    producer:
      bootstrap-servers: 172.24.0.30:9092,172.24.0.31:9093,172.24.0.32:9094
