mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-20 20:39:55 +00:00
refactor: 重构Dockerfile和docker-compose配置,优化项目结构
将原有的Dockerfile和docker-compose配置文件从devops目录移动到项目根目录,并更新相关路径配置。删除冗余的devops目录及其内容,简化项目结构,提高可维护性。
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
# 使用官方的 Python 3.10 镜像作为基础镜像
|
||||
FROM python:3.10
|
||||
|
||||
# 使用 LABEL 替代 MAINTAINER
|
||||
LABEL maintainer="948080782@qq.com"
|
||||
|
||||
# 设置时区
|
||||
ENV TZ Asia/Shanghai
|
||||
|
||||
# 设置容器内工作目录
|
||||
WORKDIR /home
|
||||
|
||||
# 将当前主机目录全部文件复制至容器工作目录
|
||||
COPY ../backend .
|
||||
|
||||
# 安装依赖
|
||||
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 8000
|
||||
Reference in New Issue
Block a user