91 lines
3.2 KiB
YAML
91 lines
3.2 KiB
YAML
spring:
|
|
application:
|
|
name: moyi-control-plane
|
|
datasource:
|
|
url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5434/moyi_control}
|
|
username: ${SPRING_DATASOURCE_USERNAME:moyi}
|
|
password: ${SPRING_DATASOURCE_PASSWORD:}
|
|
hikari:
|
|
maximum-pool-size: ${DB_POOL_MAX_SIZE:15}
|
|
minimum-idle: ${DB_POOL_MIN_IDLE:2}
|
|
data:
|
|
redis:
|
|
host: ${MOYI_REDIS_HOST:localhost}
|
|
port: ${MOYI_REDIS_PORT:6379}
|
|
username: ${MOYI_REDIS_USERNAME:}
|
|
password: ${MOYI_REDIS_PASSWORD:}
|
|
database: ${MOYI_REDIS_DATABASE:0}
|
|
ssl:
|
|
enabled: ${MOYI_REDIS_SSL:false}
|
|
connect-timeout: 2s
|
|
timeout: 2s
|
|
flyway:
|
|
enabled: ${FLYWAY_ENABLED:true}
|
|
baseline-on-migrate: ${FLYWAY_BASELINE_ON_MIGRATE:false}
|
|
|
|
server:
|
|
address: ${CONTROL_PLANE_HOST:0.0.0.0}
|
|
port: ${CONTROL_PLANE_PORT:8787}
|
|
shutdown: graceful
|
|
# Native Tomcat processing trusts only its configured internal proxies, never arbitrary clients.
|
|
forward-headers-strategy: ${MOYI_FORWARD_HEADERS_STRATEGY:none}
|
|
|
|
management:
|
|
endpoints:
|
|
web:
|
|
exposure:
|
|
include: health,info,prometheus
|
|
endpoint:
|
|
health:
|
|
probes:
|
|
enabled: true
|
|
|
|
moyi:
|
|
gateway:
|
|
redis-prefix: ${MOYI_REDIS_KEY_PREFIX:moyi:}
|
|
requests-per-minute: ${GATEWAY_REQUESTS_PER_MINUTE:60}
|
|
reads-per-minute: ${GATEWAY_READS_PER_MINUTE:300}
|
|
# 0 disables the MOYI-side model-group cap so channel concurrency can be
|
|
# measured directly. Set a positive value only when a provider confirms
|
|
# a shared per-model limit.
|
|
default-model-concurrency: ${GATEWAY_DEFAULT_MODEL_CONCURRENCY:0}
|
|
default-key-concurrency: ${GATEWAY_DEFAULT_KEY_CONCURRENCY:4}
|
|
# Temporary measurement switch. When true, skip MOYI model/group slots
|
|
# while retaining the independent API-Key limit, RPM, billing and the
|
|
# provider's own response/limit.
|
|
disable-model-concurrency: ${GATEWAY_DISABLE_MODEL_CONCURRENCY:false}
|
|
queue-wait-ms: ${GATEWAY_QUEUE_WAIT_MS:30000}
|
|
queue-poll-ms: ${GATEWAY_QUEUE_POLL_MS:100}
|
|
tasks:
|
|
max-queued-per-model: ${TASK_MAX_QUEUED_PER_MODEL:100}
|
|
worker-interval-ms: ${MOYI_TASK_WORKER_INTERVAL_MS:1000}
|
|
provider-timeout-ms: ${MOYI_TASK_PROVIDER_TIMEOUT_MS:3600000}
|
|
web:
|
|
cors-origins: ${CONTROL_PLANE_CORS_ORIGINS:http://localhost:5173,http://127.0.0.1:5173}
|
|
auth:
|
|
session-ttl-hours: ${SESSION_TTL_HOURS:168}
|
|
password-pepper: ${AUTH_PASSWORD_PEPPER:}
|
|
secure-cookie: ${AUTH_SECURE_COOKIE:false}
|
|
bootstrap:
|
|
admin-account: ${ADMIN_ACCOUNT:adimin}
|
|
admin-password: ${ADMIN_PASSWORD:admin123}
|
|
admin-display-name: ${ADMIN_DISPLAY_NAME:平台管理员}
|
|
credentials:
|
|
encryption-key: ${CREDENTIAL_ENCRYPTION_KEY:}
|
|
storage:
|
|
oss-endpoint: ${OSS_ENDPOINT:}
|
|
oss-region: ${OSS_REGION:}
|
|
oss-bucket: ${OSS_BUCKET:}
|
|
oss-access-key-id: ${OSS_ACCESS_KEY_ID:}
|
|
oss-access-key-secret: ${OSS_ACCESS_KEY_SECRET:}
|
|
providers:
|
|
deepseek:
|
|
api-key: ${DEEPSEEK_API_KEY:}
|
|
base-url: ${DEEPSEEK_BASE_URL:https://api.deepseek.com}
|
|
kimi:
|
|
api-key: ${KIMI_API_KEY:}
|
|
base-url: ${KIMI_BASE_URL:https://api.moonshot.ai/v1}
|
|
zhipu:
|
|
api-key: ${ZHIPU_API_KEY:}
|
|
base-url: ${ZHIPU_BASE_URL:https://open.bigmodel.cn/api/paas/v4}
|