Commit 8a67bdac by sunqi02

feat: add Dockerfile.dev for development with hot reload

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 67b5253c
FROM python:3.12-slim
# 设置环境变量,避免 Python 缓冲输出和生成 .pyc 文件
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
WORKDIR /app
# 安装系统依赖(如有需要编译的 Python 包)
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
# 安装 Python 依赖(先拷贝 requirements 利用 Docker 缓存层)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 拷贝项目文件(开发时会被 volume 覆盖)
COPY app/ ./app/
COPY config/ ./config/
COPY skills/ ./skills/
COPY sitecustomize.py ./
EXPOSE 8000
# 开发模式:热重载
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!