version: '3.8'

services:
  content-service:
    image: content-service:latest
    container_name: content-service
    ports:
      - "8084:8084"
    environment:
      # Spring Profile
      SPRING_PROFILES_ACTIVE: prod

      # Server Configuration
      SERVER_PORT: 8084

      # Redis Configuration (외부 Redis 서버)
      REDIS_HOST: 20.214.210.71
      REDIS_PORT: 6379
      REDIS_PASSWORD: Hi5Jessica!

      # Kafka Configuration (외부 Kafka 서버)
      KAFKA_BOOTSTRAP_SERVERS: 4.230.50.63:9092
      KAFKA_CONSUMER_GROUP_ID: content-service-consumers

      # JWT Configuration
      JWT_SECRET: kt-event-marketing-jwt-secret-key-for-authentication-and-authorization-2025
      JWT_ACCESS_TOKEN_VALIDITY: 3600000
      JWT_REFRESH_TOKEN_VALIDITY: 604800000

      # Replicate API (Stable Diffusion)
      REPLICATE_API_TOKEN: r8_Q33U00fSnpjYlHNIRglwurV446h7g8V2wkFFa

      # Azure Blob Storage Configuration
      AZURE_STORAGE_CONNECTION_STRING: DefaultEndpointsProtocol=https;AccountName=blobkteventstorage;AccountKey=tcBN7mAfojbl0uGsOpU7RNuKNhHnzmwDiWjN31liSMVSrWaEK+HHnYKZrjBXXAC6ZPsuxUDlsf8x+AStd++QYg==;EndpointSuffix=core.windows.net
      AZURE_CONTAINER_NAME: content-images

      # Logging Configuration
      LOG_LEVEL_APP: INFO
      LOG_LEVEL_ROOT: INFO

      # JVM Options
      JAVA_OPTS: "-Xmx512m -Xms256m"

    restart: unless-stopped

    healthcheck:
      test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8084/actuator/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 60s

    networks:
      - kt-event-network

networks:
  kt-event-network:
    driver: bridge
