-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
81 lines (72 loc) · 3.48 KB
/
Copy path.env.example
File metadata and controls
81 lines (72 loc) · 3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Backend 环境变量说明;Vdoc 进程不会自动加载此文件。
# 原生运行请由 shell 或进程管理器导出变量。完整 workspace 的 Docker
# Compose 会读取根目录 ../.env(由 ../.env.example 或 bootstrap 脚本生成)。
# 环境变量会覆盖 config.yaml 中的对应配置。
# 服务器配置
VDOC_SERVER_HOST=0.0.0.0
VDOC_SERVER_PORT=8080
# Native process-manager deployments may set a PID file. Docker disables it.
# VDOC_SERVER_PID_FILE="vdoc.pid"
# VDOC_SERVER_READ_TIMEOUT="30s"
# VDOC_SERVER_WRITE_TIMEOUT="30s"
# VDOC_SERVER_IDLE_TIMEOUT="120s"
# VDOC_SERVER_SHUTDOWN_TIMEOUT="10s"
# VDOC_SERVER_MAX_HEADER_BYTES=1048576
# 设为空字符串可关闭 /static。
# VDOC_SERVER_STATIC_DIR="./static"
# 精确列出允许访问 API 的 Admin/Public Share Origin,逗号分隔;生产环境禁止使用 *。
# VDOC_SERVER_CORS_ALLOWED_ORIGINS="http://localhost:5173,http://127.0.0.1:5173,http://localhost:4173,http://127.0.0.1:4173"
# 反向代理部署时只填写 backend 实际连接到的代理 IP/CIDR;直连部署保持为空。
# 禁止配置 0.0.0.0/0 或 ::/0,否则客户端可以伪造 X-Forwarded-For。
# VDOC_SERVER_TRUSTED_PROXIES="127.0.0.1,10.0.0.0/8"
# VDOC_SERVER_MAX_BODY_SIZE="10MB"
# VDOC_SERVER_ENABLE_RATE_LIMIT=true
# VDOC_SERVER_GLOBAL_RATE_LIMIT=100
# VDOC_SERVER_GLOBAL_RATE_BURST=200
# 匿名 HTTP 注册默认关闭。仅可信的一次性试点环境可显式开启;生产环境请配置初始管理员。
# VDOC_AUTH_ALLOW_REGISTRATION=false
# register/login 始终启用独立的每 IP 限流。
# VDOC_AUTH_RATE_LIMIT=2
# VDOC_AUTH_RATE_BURST=5
# JWT 配置
# 生成方式示例:openssl rand -base64 32
VDOC_JWT_KEY=""
VDOC_JWT_EXPIRATION="12h"
# 日志配置
# VDOC_LOG_MAX_SIZE=50
# VDOC_LOG_MAX_AGE=30
# 运行模式
# model=dev # 开发模式
# model=release # 生产模式
# PostgreSQL(启用后启动失败不会回退到内存模式)
VDOC_DATABASE_ENABLED=false
# VDOC_DATABASE_DSN="postgres://vdoc:replace-with-local-password@127.0.0.1:5432/vdoc?sslmode=disable"
# VDOC_DATABASE_MAX_OPEN_CONNS=20
# VDOC_DATABASE_MAX_IDLE_CONNS=5
# RustFS/S3-compatible object storage(启用后初始化失败不会静默禁用)
VDOC_STORAGE_ENABLED=false
# VDOC_STORAGE_ENDPOINT="127.0.0.1:9000"
# VDOC_STORAGE_BUCKET="vdoc"
# VDOC_STORAGE_ACCESS_KEY=""
# VDOC_STORAGE_SECRET_KEY=""
# VDOC_STORAGE_REGION="us-east-1"
# VDOC_STORAGE_USE_SSL=false
# VDOC_STORAGE_PATH_STYLE=true
# MCP token ciphertext settings
# VDOC_MCP_TOKEN_CIPHER_KEY=""
VDOC_MCP_TOKEN_CIPHER_KID="local-aes-gcm-v1"
# JSON object of previous KID -> key mappings, used only during rotation.
VDOC_MCP_TOKEN_CIPHER_KEYRING="{}"
# Local Docker Compose helper values. Required by docker compose; generate local-only values before use.
# Dependency ports bind to loopback by default. Change the publish address only
# when LAN exposure, firewalling, TLS, and access control are intentional.
# VDOC_DOCKER_PUBLISH_ADDRESS="127.0.0.1"
# VDOC_DOCKER_POSTGRES_HOST_PORT="5432"
# VDOC_DOCKER_RUSTFS_HOST_PORT="9000"
# VDOC_DOCKER_RUSTFS_CONSOLE_HOST_PORT="9001"
# Keep both RustFS CORS values restricted to the exact Console origins.
# VDOC_DOCKER_RUSTFS_CORS_ALLOWED_ORIGINS="http://127.0.0.1:9001,http://localhost:9001"
# VDOC_DOCKER_RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="http://127.0.0.1:9001,http://localhost:9001"
# VDOC_DOCKER_POSTGRES_PASSWORD="replace-with-local-password"
# VDOC_DOCKER_RUSTFS_ACCESS_KEY="replace-with-local-access-key"
# VDOC_DOCKER_RUSTFS_SECRET_KEY="replace-with-local-secret-key"