Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
RobbsLuo
Coding2API
Repository navigation
Code
Issues
1
(1)
Pull requests
2
(2)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
Coding2API
/
.env.example
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
51 lines (39 loc) · 2.19 KB
main
Breadcrumbs
Coding2API
/
.env.example
Copy path
Top
File metadata and controls
Code
Blame
51 lines (39 loc) · 2.19 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
# 环境变量模板:复制为 .env 后按需修改。
#
# cp .env.example .env
#
# 只有 APP_SECRET 必填(其余留空即用括号内的默认值)。完整清单与逐项说明见
# README「配置」一节(权威默认值在 src/config.py,且每一项都已透传到
# docker-compose.yml)。
#
# .env 不入库(见 .gitignore);切勿把真实 APP_SECRET 提交进仓库。
# 凭证列加密密钥,≥16 字符。丢失 = 已存凭证全部不可解,只能重录(无密钥轮换)。
# 生成:python -c "import secrets; print(secrets.token_urlsafe(32))"
APP_SECRET=
# 管理台管理员用户名(逗号分隔)。仅引导期生效:DB 里已有角色后不再覆盖。
ADMIN_USERNAMES=admin
# 浏览器可达地址。远程部署必须设成真实可达地址,TRAE 登录回调依赖它。
PUBLIC_BASE_URL=http://127.0.0.1:8000
# 监听地址与端口(PORT 同时决定 compose 的宿主机映射端口与容器内监听端口)。
HOST=127.0.0.1
PORT=8000
# 时区。容器默认 Asia/Shanghai;改这里会透传进容器(务必保持与宿主一致,
# 签到 / 额度周期按「今天 9 点」判断)。
TZ=Asia/Shanghai
# SQLite 与运行数据目录。
DATA_DIR=./data
# 仅引导期:老式用户文件路径,启动时一次性导入 SQLite(幂等)。
USERS_FILE=secrets/users.txt
# 请求未指定模型(或为 auto/空)时使用的默认模型。
DEFAULT_MODEL=glm-5.2
# Host 白名单(逗号分隔,防 DNS rebinding);留空 = 放行本地回环与 PUBLIC_BASE_URL 主机。
ALLOWED_HOSTS=
# 是否暴露 /docs 与 /openapi.json;默认关闭(匿名可拉全量端点清单 = 送侦察图)。
ENABLE_DOCS=false
# 是否采信 X-Forwarded-For(仅当本服务前面恰好一层受信反代时开启)。
TRUST_PROXY=false
# 按渠道出站代理,格式 `渠道=代理URL;渠道2=代理URL2`;留空 = 全部直连。
# 渠道取八个渠道名,协议支持 http/https/socks5/socks5h。环境变量 HTTP_PROXY 等一律不采信。
# ⚠️ 容器里 127.0.0.1 指容器自身,不是宿主:代理跑在宿主时须写
# host.docker.internal(compose 已加 extra_hosts),如 codebuddy=http://host.docker.internal:7897。
PROVIDER_PROXIES=
You can’t perform that action at this time.