Files
Aether/.env.example
2026-05-14 14:09:27 +08:00

64 lines
2.2 KiB
Plaintext
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.
# ==================== 必须配置(启动前) ====================
# 以下配置项必须在项目启动前设置
# 应用端口(默认 8084
APP_PORT=8084
# Docker Compose 镜像(默认正式版 latest提前测试可改 rc/beta也可固定具体版本
# 示例:
# APP_IMAGE=ghcr.io/fawney19/aether:latest
# APP_IMAGE=ghcr.io/fawney19/aether:rc
# APP_IMAGE=ghcr.io/fawney19/aether:beta
# APP_IMAGE=ghcr.io/fawney19/aether:0.7.0-rc.1
# API Key 前缀(默认 sk
API_KEY_PREFIX=sk
# Rust 日志过滤(默认 aether_gateway=info
# 示例: aether_gateway=debug,sqlx=warn
RUST_LOG=aether_gateway=info
# CORS 配置(跨域带 Cookie 时不要写 *,必须显式列出前端源)
# 示例: http://localhost:5173,https://app.example.com
# CORS_ORIGINS=http://localhost:5173
# CORS_ALLOW_CREDENTIALS=true
# 如果前后端跨站并依赖登录刷新 Cookie还要配合
# AUTH_REFRESH_COOKIE_SAMESITE=None
# AUTH_REFRESH_COOKIE_SECURE=true
# 数据库配置
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_NAME=aether
DB_PASSWORD=aether
# Redis 配置
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=aether
# JWT密钥使用 ./generate_keys.sh 生成)
# 用于用户登录 token 签名,更换后所有用户需重新登录
JWT_SECRET_KEY=change-this-to-a-secure-random-string
# 独立加密密钥(用于加密 Provider API Key 等敏感数据)
# 注意:更换此密钥后需要在管理面板重新配置所有 Provider API Key
ENCRYPTION_KEY=change-this-to-another-secure-random-string
# 启动自举管理员(仅在当前库里还没有活动管理员时生效)
# 手动部署时取消注释并设置install.sh 首次生成配置时会提示输入。
ADMIN_EMAIL=admin@example.com
ADMIN_USERNAME=admin
# ADMIN_PASSWORD=
# ==================== 可选配置(有默认值) ====================
# docker compose 下 app 启动前自动执行 pending migration/backfill默认 true
# AETHER_GATEWAY_AUTO_PREPARE_DATABASE=true
# PostgreSQL 连接池配置(默认适合单实例/小型部署;高并发可按需调大)
# AETHER_GATEWAY_DATA_POSTGRES_MIN_CONNECTIONS=1
# AETHER_GATEWAY_DATA_POSTGRES_MAX_CONNECTIONS=20
# AETHER_GATEWAY_DATA_POSTGRES_IDLE_TIMEOUT_MS=30000