feat(deploy): 添加 nginx 反向代理配置并优化前端构建流程

- 新增 nginx 配置模板,用于前端服务的反向代理
- 更新 Dockerfile,使用 pnpm 替代 npm 并添加 nginx 配置
- 添加启动脚本,实现后端健康检查和动态配置 nginx
- 更新 .env.example,为后端主机添加注释说明
- 优化 docker-compose.yml,明确版本号并调整服务依赖
This commit is contained in:
Jefferyhcool
2025-04-16 02:04:16 +08:00
parent 6c21aa2055
commit 517bf04720
5 changed files with 63 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
version: "3.9"
services:
backend:
@@ -14,6 +15,7 @@ services:
- ./backend:/app
ports:
- "${BACKEND_PORT}:${BACKEND_PORT}"
depends_on:
- frontend
@@ -26,3 +28,5 @@ services:
- .env
ports:
- "${FRONTEND_PORT}:80"