application.yml 1.23 KB
spring:
  application:
    name: user-service
  profiles:
    active: prod
  datasource:
    url: jdbc:postgresql://postgresql.ecommerce.svc.cluster.local:5432/ecommerce_users
    username: ${DB_USERNAME:postgres}
    password: ${DB_PASSWORD:password}
    driver-class-name: org.postgresql.Driver
  jpa:
    hibernate:
      ddl-auto: validate
    properties:
      hibernate:
        dialect: org.hibernate.dialect.PostgreSQLDialect
        show_sql: false
        format_sql: true
  redis:
    host: redis.ecommerce.svc.cluster.local
    port: 6379
    password: ${REDIS_PASSWORD:password}
    timeout: 2000

server:
  port: 8080
  servlet:
    context-path: /api

eureka:
  client:
    service-url:
      defaultZone: http://service-registry:8761/eureka/
    register-with-eureka: true
    fetch-registry: true

management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics,prometheus
  endpoint:
    health:
      show-details: always

logging:
  level:
    com.ecommerce.user: INFO
    org.springframework.security: WARN
  pattern:
    console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"

jwt:
  secret: ${JWT_SECRET:mySecretKey}
  expiration: 3600000 # 1 hour
  refresh-expiration: 86400000 # 24 hours