main:更新 .env.example,翻译并补充配置项
变更内容: - 将原配置项注释翻译为中文,提升可读性。 - 补充 Redis、异步任务、Worker 等相关配置项,为后续功能扩展做好准备。 - 调整文件结构和注释风格,规范化配置文件说明。
This commit is contained in:
73
.env.example
73
.env.example
@@ -1,32 +1,87 @@
|
||||
# Environment Configuration
|
||||
# Copy this file to .env and fill in your values
|
||||
|
||||
# Application
|
||||
# =============================================================================
|
||||
# 应用信息
|
||||
# =============================================================================
|
||||
APP_NAME=FunctionalScaffold
|
||||
APP_VERSION=1.0.0
|
||||
APP_ENV=development
|
||||
|
||||
# Server
|
||||
# =============================================================================
|
||||
# 服务器配置
|
||||
# =============================================================================
|
||||
HOST=0.0.0.0
|
||||
PORT=8000
|
||||
WORKERS=4
|
||||
|
||||
# Logging
|
||||
# =============================================================================
|
||||
# 日志配置
|
||||
# =============================================================================
|
||||
LOG_LEVEL=INFO
|
||||
LOG_FORMAT=json
|
||||
# 日志文件配置(可选,默认禁用)
|
||||
LOG_FILE_ENABLED=false
|
||||
LOG_FILE_PATH=/var/log/app/app.log
|
||||
|
||||
# Metrics
|
||||
# =============================================================================
|
||||
# 指标配置
|
||||
# =============================================================================
|
||||
METRICS_ENABLED=true
|
||||
METRICS_CONFIG_PATH=config/metrics.yaml
|
||||
# 指标实例 ID(可选,默认使用 hostname)
|
||||
# METRICS_INSTANCE_ID=my-instance
|
||||
|
||||
# Tracing
|
||||
# =============================================================================
|
||||
# 追踪配置
|
||||
# =============================================================================
|
||||
TRACING_ENABLED=false
|
||||
JAEGER_ENDPOINT=http://localhost:14268/api/traces
|
||||
# JAEGER_ENDPOINT=http://localhost:14268/api/traces
|
||||
|
||||
# External Services (examples)
|
||||
# =============================================================================
|
||||
# Redis 配置
|
||||
# =============================================================================
|
||||
REDIS_HOST=localhost
|
||||
REDIS_PORT=6379
|
||||
REDIS_DB=0
|
||||
REDIS_PASSWORD=your_redis_password
|
||||
|
||||
# =============================================================================
|
||||
# 异步任务配置
|
||||
# =============================================================================
|
||||
# 任务结果缓存时间(秒),默认 30 分钟
|
||||
JOB_RESULT_TTL=1800
|
||||
# Webhook 最大重试次数
|
||||
WEBHOOK_MAX_RETRIES=3
|
||||
# Webhook 超时时间(秒)
|
||||
WEBHOOK_TIMEOUT=10
|
||||
# 最大并发任务数
|
||||
MAX_CONCURRENT_JOBS=10
|
||||
|
||||
# =============================================================================
|
||||
# Worker 配置
|
||||
# =============================================================================
|
||||
# Worker 轮询间隔(秒)
|
||||
WORKER_POLL_INTERVAL=1.0
|
||||
# 任务队列 Redis Key
|
||||
JOB_QUEUE_KEY=job:queue
|
||||
# 全局并发计数器 Redis Key
|
||||
JOB_CONCURRENCY_KEY=job:concurrency
|
||||
# 任务锁 TTL(秒)
|
||||
JOB_LOCK_TTL=300
|
||||
# 任务最大重试次数
|
||||
JOB_MAX_RETRIES=3
|
||||
# 任务执行超时(秒)
|
||||
JOB_EXECUTION_TIMEOUT=300
|
||||
|
||||
# =============================================================================
|
||||
# 外部服务配置(示例)
|
||||
# =============================================================================
|
||||
# OSS 配置
|
||||
# OSS_ENDPOINT=https://oss-cn-hangzhou.aliyuncs.com
|
||||
# OSS_ACCESS_KEY_ID=your_access_key
|
||||
# OSS_ACCESS_KEY_SECRET=your_secret_key
|
||||
# OSS_BUCKET_NAME=your_bucket
|
||||
|
||||
# Database (if needed)
|
||||
# DATABASE_URL=mysql://user:password@localhost:5432/dbname
|
||||
# 数据库配置
|
||||
# DATABASE_URL=mysql://user:password@localhost:3306/dbname
|
||||
|
||||
Reference in New Issue
Block a user