huoyan-enterprise/backend/Dockerfile

17 lines
359 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Python 3.11 + uv与 pyproject 中 requires-python 一致)
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim
WORKDIR /app
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
COPY . .
ENV PYTHONUNBUFFERED=1
EXPOSE 7861 7862
# 端口以环境变量 API.PORT / API_PORT 为准(见 core.config
CMD ["uv", "run", "python", "-m", "main"]