refactor(docker): 合并Dockerfile并更新部署指南

- 删除旧的Dockerfile.frontend和Dockerfile.backend,合并为单一的Dockerfile
- 更新docker-compose.yaml以使用新的Dockerfile
- 移除部署指南中的本地部署部分,添加docker部署说明
- 更新前端.env.production中的API地址
- 优化nginx配置以解决页面刷新404问题
This commit is contained in:
zhangtao
2025-05-17 09:01:27 +08:00
parent df85dd8559
commit 40a58df666
21 changed files with 146 additions and 1705 deletions
+23
View File
@@ -0,0 +1,23 @@
# 使用官方的 Python 3.10 镜像作为基础镜像
FROM python:3.10
# 使用 LABEL 替代 MAINTAINER
LABEL maintainer="948080782@qq.com"
# 设置时区
ENV TZ Asia/Shanghai
# 设置容器内工作目录
WORKDIR /home
# 将当前主机目录全部文件复制至容器工作目录
COPY backend/requirements.txt .
# 安装依赖
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
# 运行应用
CMD ["python", "main.py", "run", "--env=prod"]
# 暴露端口
EXPOSE 8001