63667ed2d1
Add configurable membership plans (free/plus/pro) synced to DB on boot, a subscription guard middleware that blocks tenant endpoints on expired or missing plans, and a MembershipBlockedView that surfaces the reason so the admin can contact the tenant owner. Quota and brand-library reads now honor the active plan's policy JSON and expired subscriptions.
134 lines
2.6 KiB
YAML
134 lines
2.6 KiB
YAML
server:
|
|
port: 8080
|
|
mode: release
|
|
|
|
database:
|
|
host: postgres
|
|
port: 5432
|
|
user: geo
|
|
password: geo_dev
|
|
dbname: geo
|
|
sslmode: disable
|
|
max_open_conns: 25
|
|
max_idle_conns: 5
|
|
|
|
monitoring_database:
|
|
host: monitoring-postgres
|
|
port: 5432
|
|
user: geo
|
|
password: geo_dev
|
|
dbname: geo_monitoring
|
|
sslmode: disable
|
|
max_open_conns: 25
|
|
max_idle_conns: 5
|
|
|
|
rabbitmq:
|
|
url: amqp://geo:geo_dev@rabbitmq:5672/geo
|
|
consumer_prefetch: 10
|
|
publish_channel_pool_size: 32
|
|
|
|
scheduler:
|
|
dispatch_interval: 15s
|
|
dispatch_timeout: 30s
|
|
dispatch_batch_size: 100
|
|
dispatch_concurrency: 4
|
|
generation_queue_backpressure_limit: 1000
|
|
|
|
monitoring_workers:
|
|
result_ingest_concurrency: 4
|
|
projection_rebuild_concurrency: 2
|
|
|
|
membership:
|
|
default_plan_code: free
|
|
plans:
|
|
- code: free
|
|
name: Free
|
|
article_generation: 3
|
|
article_quota_cycle: lifetime
|
|
image_storage_bytes: 10485760
|
|
company_limit: 1
|
|
subscription_duration: 72h
|
|
contact_admin_on_expiry: true
|
|
- code: plus
|
|
name: Plus
|
|
article_generation: 200
|
|
article_quota_cycle: monthly
|
|
image_storage_bytes: 524288000
|
|
company_limit: 1
|
|
subscription_duration: 720h
|
|
- code: pro
|
|
name: Pro
|
|
article_generation: 400
|
|
article_quota_cycle: monthly
|
|
image_storage_bytes: 1073741824
|
|
company_limit: 2
|
|
subscription_duration: 720h
|
|
|
|
redis:
|
|
addr: redis:6379
|
|
db: 0
|
|
|
|
qdrant:
|
|
url: qdrant:6334
|
|
api_key: ""
|
|
collection: geo_knowledge_chunks
|
|
timeout: 15s
|
|
|
|
object_storage:
|
|
provider: minio
|
|
endpoint: minio:9000
|
|
access_key: minioadmin
|
|
secret_key: minioadmin
|
|
bucket: geo-private
|
|
use_ssl: false
|
|
public_base_url: ""
|
|
region: ""
|
|
|
|
cache:
|
|
driver: redis
|
|
|
|
jwt:
|
|
# Override via JWT_SECRET env var in .env
|
|
secret: "change-me-in-production"
|
|
access_ttl: 15m
|
|
refresh_ttl: 168h
|
|
|
|
log:
|
|
level: info,warn,error
|
|
format: json
|
|
|
|
llm:
|
|
provider: ark
|
|
base_url: https://ark.cn-beijing.volces.com/api/v3
|
|
# api_key is injected via LLM_API_KEY env var
|
|
api_key: ""
|
|
model: doubao-seed-2-0-lite-260215
|
|
knowledge_url_model: doubao-seed-2-0-mini-260215
|
|
timeout: 2m
|
|
max_output_tokens: 16000
|
|
temperature: 0.7
|
|
reasoning_effort: minimal
|
|
web_search_limit: 3
|
|
|
|
retrieval:
|
|
provider: siliconflow
|
|
base_url: https://api.siliconflow.cn/v1
|
|
# api_key is injected via SILICONFLOW_API_KEY env var
|
|
api_key: ""
|
|
embedding_model: BAAI/bge-m3
|
|
reranker_model: BAAI/bge-reranker-v2-m3
|
|
timeout: 30s
|
|
chunk_size: 900
|
|
chunk_overlap: 120
|
|
embedding_batch_size: 16
|
|
recall_limit: 12
|
|
rerank_top_n: 6
|
|
max_chunks_per_doc: 6
|
|
overlap_tokens: 60
|
|
|
|
generation:
|
|
queue_size: 128
|
|
worker_concurrency: 8
|
|
stream_enabled: false
|
|
article_timeout: 8m
|