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:
zhangtao
2025-05-17 01:34:52 +08:00
parent 5eaf16631c
commit e1d7d27967
15 changed files with 171 additions and 339 deletions
+1 -2
View File
@@ -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}")