Download .env.example from LifeVta/Grok3API: direct link, hf CLI and curl.
- Browser
- Download file 1.37 kB
-
https://huggingface.co/spaces/LifeVta/Grok3API/resolve/main/.env.example
- Command line
-
hf download hf://spaces/LifeVta/Grok3API/.env.example
-
curl -L -o .env.example https://huggingface.co/spaces/LifeVta/Grok3API/resolve/main/.env.example
1.37 kB
| # 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 | |