Add decoupled Docker support with zero-intrusion design

This commit is contained in:
cto-new[bot] committed 2026-02-03 17:07:22 +00:00
1 parent 06ae417dad
commit 43cb68cc1d
6 files changed
+279 -53

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
# DS2API Docker 镜像
# 采用极简、零侵入设计,所有配置通过环境变量传递
# 主代码更新时只需重新构建镜像,无需修改 Dockerfile
FROM python:3.11-slim
WORKDIR /app
# 安装依赖(利用 Docker 缓存层)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 复制整个项目(保留原始目录结构)
COPY . .
# 暴露服务端口
EXPOSE 5001
# 启动命令(依赖项目自身的启动逻辑)
CMD ["python", "app.py"]