mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 04:46:26 +00:00
refactor(devops): 重构 Docker 配置和目录结构
- 移除旧的 `Dockerfile` 和 `nginx.conf`,新增独立的 `frontend` 和 `backend` Dockerfile - 更新 `docker-compose.yaml`,简化服务配置并优化网络和卷挂载 - 移除 `start.sh` 和 `stop.sh` 脚本,简化部署流程 - 将环境配置文件移动到 `backend/env` 目录,并移除旧的 `.env` 文件 - 更新 `backend/app/config/setting.py` 以适配新的环境配置文件路径
This commit is contained in:
@@ -370,8 +370,7 @@ def get_settings() -> Settings:
|
||||
if env not in [e.value for e in EnvironmentEnum]:
|
||||
raise ValueError(f"无效的环境配置: {env}")
|
||||
|
||||
current_dir = Path(__file__).parent
|
||||
env_file = current_dir / f".env.{env}"
|
||||
env_file = Path(__file__).parent.parent.parent / "env" / f".env.{env}"
|
||||
|
||||
if not env_file.exists():
|
||||
raise FileNotFoundError(f"环境配置文件不存在: {env_file}")
|
||||
|
||||
Reference in New Issue
Block a user