Files
grok2api/.env.example
T

50 lines
1.3 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Grok2API environment example
#
# 用法:
# 1. 复制为 .env 后按需修改
# 2. 启动期 / 部署期变量放这里
# 3. 常规运行时配置优先改 ${DATA_DIR}/config.toml
# ==================== 基础运行 ====================
TZ=Asia/Shanghai
LOG_LEVEL=INFO
# 写入本地文件日志
LOG_FILE_ENABLED=true
# 账号目录增量同步间隔(秒)
ACCOUNT_SYNC_INTERVAL=30
# ==================== Web 服务 / Docker Compose ====================
SERVER_HOST=0.0.0.0
SERVER_PORT=8000
SERVER_WORKERS=1
# Docker Compose 宿主机映射端口
HOST_PORT=8000
# ==================== 账号存储(启动期) ====================
# 可选:local | redis | mysql | postgresql
ACCOUNT_STORAGE=local
# redis: Redis DSN(ACCOUNT_STORAGE=redis 时必填)
# ACCOUNT_REDIS_URL=redis://:password@host:6379/0
# mysql: SQLAlchemy DSN
# ACCOUNT_MYSQL_URL=mysql+aiomysql://user:password@127.0.0.1:3306/grok2api
# postgresql: SQLAlchemy DSN
# ACCOUNT_POSTGRESQL_URL=postgresql+asyncpg://user:password@127.0.0.1:5432/grok2api
# SQL 连接池(mysql / postgresql 模式,以下均为默认值,无需改动即可生效)
# ACCOUNT_SQL_POOL_SIZE=5
# ACCOUNT_SQL_MAX_OVERFLOW=10
# ACCOUNT_SQL_POOL_TIMEOUT=30
# ACCOUNT_SQL_POOL_RECYCLE=1800
# ==================== 可选:本地数据 / 日志目录 ====================
DATA_DIR=./data
LOG_DIR=./logs