Reapply "Merge branch 'main' of https://github.com/GooGuTeam/osu_lazer_api"
This reverts commit 68701dbb1d.
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user