37 lines
1.2 KiB
Bash
37 lines
1.2 KiB
Bash
# ---------------------------------------------------------------------------
|
|||
|
|
# 班级小助手 · Docker Compose 环境变量
|
||
|
|
# 复制为 deploy/.env 后填写:cp deploy/.env.example deploy/.env
|
||
|
|
# ---------------------------------------------------------------------------
|
||
|
|
|
||
|
|
# 服务端对外端口(宿主机)
|
||
|
|
SERVER_PORT=4000
|
||
|
|
|
||
|
|
# 应用版本(镜像标签)
|
||
|
|
APP_VERSION=0.1.0
|
||
|
|
|
||
|
|
# MySQL 配置
|
||
|
|
MYSQL_ROOT_PASSWORD=请改成强密码_root
|
||
|
|
MYSQL_DATABASE=classhelper
|
||
|
|
MYSQL_USER=classhelper
|
||
|
|
MYSQL_PASSWORD=请改成强密码_app
|
||
|
|
|
||
|
|
# JWT 签名密钥(必填,必须 ≥32 位;生成:
|
||
|
|
# docker run --rm node:22-slim node -e "console.log(require('crypto').randomBytes(48).toString('hex'))"
|
||
|
|
# 或本地:node -e "console.log(require('crypto').randomBytes(48).toString('hex'))"
|
||
|
|
JWT_SECRET=
|
||
|
|
|
||
|
|
# 令牌有效期
|
||
|
|
JWT_EXPIRES_IN=7d
|
||
|
|
|
||
|
|
# 允许的跨域来源;使用域名访问时建议写成具体来源,例如 https://class.example.com
|
||
|
|
CORS_ORIGIN=*
|
||
|
|
|
||
|
|
# 首次启动创建的管理员账号(部署完成后请立即登录修改密码)
|
||
|
|
INITIAL_ADMIN_USERNAME=admin
|
||
|
|
INITIAL_ADMIN_PASSWORD=admin123
|
||
|
|
|
||
|
|
# 第 1 教学周的周一(用于"当前周次")
|
||
|
|
TERM_START_DATE=2026-08-31
|
||
|
|
|
||
|
|
# 日志级别:debug | info | warn | error
|
||
|
|
LOG_LEVEL=info
|