feat: add actuator and Consul discovery to rag-service

This commit is contained in:
2026-02-18 20:02:33 +01:00
parent 450f8cadc8
commit cf87107156
2 changed files with 32 additions and 5 deletions

View File

@@ -5,11 +5,21 @@ spring.ai.openai.base-url=${SPRING_AI_OPENAI_BASE_URL:https://api.groq.com/opena
spring.ai.openai.api-key=${SPRING_AI_OPENAI_API_KEY:}
spring.ai.openai.chat.model=${SPRING_AI_OPENAI_CHAT_MODEL:llama-3.3-70b-versatile}
# --- Embedding model: use local pgvector with a lightweight model ---
# Groq does not provide an embedding endpoint, so we disable OpenAI embedding auto-config
# and rely on the pgvector store's existing embedding setup
# --- Embedding model: local ONNX (Groq has no embedding API) ---
spring.ai.openai.embedding.enabled=false
# --- Consul service discovery ---
spring.cloud.consul.host=${SPRING_CLOUD_CONSUL_HOST:localhost}
spring.cloud.consul.port=${SPRING_CLOUD_CONSUL_PORT:8500}
spring.cloud.consul.discovery.service-name=rag-service
spring.cloud.consul.discovery.instance-id=${spring.application.name}-${random.value}
spring.cloud.consul.discovery.prefer-ip-address=true
spring.cloud.consul.discovery.health-check-interval=10s
# --- Actuator ---
management.endpoints.web.exposure.include=health,info
management.endpoint.health.show-details=always
jwt.secret=${JWT_SECRET:ywfI6dBznYmHbokihB/OBzZz6E0Fj+6PiqrM8dQ5c3t0HeYarblCbOGM8vQtOt472AtQ+MsCH7OVIKHOzjrPsQ==}
jwt.expiration=103600000
spring.datasource.url=${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/ragdb}