Merge pull request #20 from ktds-dg0501/feature/ai

ai-service application.yml 환경 변수를 static 값으로 변경
This commit is contained in:
SWPARK 2025-10-28 16:37:16 +09:00 committed by GitHub
commit 9438e0d285
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,11 +5,11 @@ spring:
# Redis Configuration # Redis Configuration
data: data:
redis: redis:
host: ${REDIS_HOST:redis-external} # Production: redis-external, Local: 20.214.210.71 host: 20.214.210.71
port: ${REDIS_PORT:6379} port: 6379
password: ${REDIS_PASSWORD:} password: Hi5Jessica!
database: ${REDIS_DATABASE:0} # AI Service uses database 3 database: 3
timeout: ${REDIS_TIMEOUT:3000} timeout: 3000
lettuce: lettuce:
pool: pool:
max-active: 8 max-active: 8
@ -19,7 +19,7 @@ spring:
# Kafka Consumer Configuration # Kafka Consumer Configuration
kafka: kafka:
bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS:localhost:9092} bootstrap-servers: 4.230.50.63:9092
consumer: consumer:
group-id: ai-service-consumers group-id: ai-service-consumers
auto-offset-reset: earliest auto-offset-reset: earliest
@ -28,14 +28,14 @@ spring:
value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
properties: properties:
spring.json.trusted.packages: "*" spring.json.trusted.packages: "*"
max.poll.records: ${KAFKA_MAX_POLL_RECORDS:10} max.poll.records: 10
session.timeout.ms: ${KAFKA_SESSION_TIMEOUT:30000} session.timeout.ms: 30000
listener: listener:
ack-mode: manual ack-mode: manual
# Server Configuration # Server Configuration
server: server:
port: ${SERVER_PORT:8083} port: 8083
servlet: servlet:
context-path: / context-path: /
encoding: encoding:
@ -45,17 +45,17 @@ server:
# JWT Configuration # JWT Configuration
jwt: jwt:
secret: ${JWT_SECRET:} secret: kt-event-marketing-secret-key-for-development-only-please-change-in-production
access-token-validity: ${JWT_ACCESS_TOKEN_VALIDITY:1800} access-token-validity: 604800000
refresh-token-validity: ${JWT_REFRESH_TOKEN_VALIDITY:86400} refresh-token-validity: 86400
# CORS Configuration # CORS Configuration
cors: cors:
allowed-origins: ${CORS_ALLOWED_ORIGINS:http://localhost:3000,http://localhost:8080} allowed-origins: http://localhost:*
allowed-methods: ${CORS_ALLOWED_METHODS:GET,POST,PUT,DELETE,OPTIONS,PATCH} allowed-methods: GET,POST,PUT,DELETE,OPTIONS,PATCH
allowed-headers: ${CORS_ALLOWED_HEADERS:*} allowed-headers: "*"
allow-credentials: ${CORS_ALLOW_CREDENTIALS:true} allow-credentials: true
max-age: ${CORS_MAX_AGE:3600} max-age: 3600
# Actuator Configuration # Actuator Configuration
management: management:
@ -100,7 +100,7 @@ logging:
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n" console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n" file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
file: file:
name: ${LOG_FILE:logs/ai-service.log} name: logs/ai-service.log
logback: logback:
rollingpolicy: rollingpolicy:
max-file-size: 10MB max-file-size: 10MB
@ -110,26 +110,20 @@ logging:
# Kafka Topics Configuration # Kafka Topics Configuration
kafka: kafka:
topics: topics:
ai-job: ${KAFKA_TOPIC_AI_JOB:ai-event-generation-job} ai-job: ai-event-generation-job
ai-job-dlq: ${KAFKA_TOPIC_AI_JOB_DLQ:ai-event-generation-job-dlq} ai-job-dlq: ai-event-generation-job-dlq
# AI External API Configuration # AI API Configuration (실제 API 사용)
ai: ai:
provider: CLAUDE
claude: claude:
api-url: ${CLAUDE_API_URL:https://api.anthropic.com/v1/messages} api-url: https://api.anthropic.com/v1/messages
api-key: ${CLAUDE_API_KEY:} api-key: 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
anthropic-version: ${CLAUDE_ANTHROPIC_VERSION:2023-06-01} anthropic-version: 2023-06-01
model: ${CLAUDE_MODEL:claude-3-5-sonnet-20241022} model: claude-sonnet-4-5-20250929
max-tokens: ${CLAUDE_MAX_TOKENS:4096} max-tokens: 4096
temperature: ${CLAUDE_TEMPERATURE:0.7} temperature: 0.7
timeout: ${CLAUDE_TIMEOUT:300000} # 5 minutes timeout: 300000
gpt4:
api-url: ${GPT4_API_URL:https://api.openai.com/v1/chat/completions}
api-key: ${GPT4_API_KEY:}
model: ${GPT4_MODEL:gpt-4-turbo-preview}
max-tokens: ${GPT4_MAX_TOKENS:4096}
timeout: ${GPT4_TIMEOUT:300000} # 5 minutes
provider: ${AI_PROVIDER:CLAUDE} # CLAUDE or GPT4
# Circuit Breaker Configuration # Circuit Breaker Configuration
resilience4j: resilience4j:
@ -168,7 +162,7 @@ resilience4j:
# Redis Cache TTL Configuration (seconds) # Redis Cache TTL Configuration (seconds)
cache: cache:
ttl: ttl:
recommendation: ${CACHE_TTL_RECOMMENDATION:86400} # 24 hours recommendation: 86400 # 24 hours
job-status: ${CACHE_TTL_JOB_STATUS:86400} # 24 hours job-status: 86400 # 24 hours
trend: ${CACHE_TTL_TREND:3600} # 1 hour trend: 3600 # 1 hour
fallback: ${CACHE_TTL_FALLBACK:604800} # 7 days fallback: 604800 # 7 days