unis_hrms/.env.example

30 lines
1.2 KiB
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# UNIS HRMS 配置(复制为项目根目录的 .env 后按需修改)
# 相对路径一律相对「项目根目录」解析,data/ 存 SQLite 库与上传附件。
# 注意:本文件同时被后端(python-dotenv)与 scripts/*.sh 读取,请只用整行注释。
APP_NAME=UNIS 人力资源管理系统
SECRET_KEY=change-me-in-production
# SQLite(默认,开箱即用)
DATABASE_URL=sqlite+aiosqlite:///./data/hrms.db
# 迁移 MySQL 时改为(运行时用 aiomysql,Alembic 自动换成 pymysql):
# DATABASE_URL=mysql+aiomysql://hrms:hrms@127.0.0.1:3306/hrms?charset=utf8mb4
# 启动时 create_all + 自动补可空列;生产建议 false,表结构交给 Alembic
AUTO_CREATE_SCHEMA=true
AUTO_SEED=false
ACCESS_TOKEN_MINUTES=120
MAX_UPLOAD_MB=20
UPLOAD_DIR=./data/uploads
CORS_ORIGINS=["http://localhost:5173","http://127.0.0.1:5173"]
# 用后端进程托管 web/dist(单容器整站部署)。前端未构建时自动跳过,
# vite 开发模式(:5173)不受影响。
SERVE_WEB_DIST=true
# 下面两项不是后端配置,由 scripts/run.sh / scripts/deploy.sh 读取
# PORT:本地一键启动的监听端口
PORT=8000
# HOST_PORT:docker-compose 暴露到宿主机的端口
HOST_PORT=8000