feat: 基础 SignalR 服务器支持

This commit is contained in:
MingxuanGame
2025-07-24 18:45:08 +08:00
committed by GitHub
parent 6ed5a2d347
commit 1655bb9f53
28 changed files with 1394 additions and 644 deletions

View File

@@ -1,6 +1,7 @@
FROM python:3.11-slim
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim
WORKDIR /app
ENV UV_PROJECT_ENVIRONMENT venv
# 安装系统依赖
RUN apt-get update && apt-get install -y \
@@ -10,10 +11,11 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*
# 复制依赖文件
COPY requirements.txt .
COPY uv.lock .
COPY pyproject.toml .
# 安装Python依赖
RUN pip install --no-cache-dir -r requirements.txt
RUN uv sync --locked
# 复制应用代码
COPY . .
@@ -22,4 +24,4 @@ COPY . .
EXPOSE 8000
# 启动命令
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]