first commit
This commit is contained in:
25
Dockerfile
25
Dockerfile
@@ -3,8 +3,15 @@ FROM python:3.12-slim
|
||||
# Install uv.
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||
|
||||
|
||||
WORKDIR /env_build
|
||||
|
||||
# Copy the application into the container.
|
||||
COPY . /app
|
||||
COPY pyproject.toml uv.lock ./
|
||||
|
||||
RUN uv sync --frozen --no-cache
|
||||
|
||||
ENV PATH="/env_build/.venv/bin:$PATH"
|
||||
|
||||
# Install the application dependencies.
|
||||
WORKDIR /app
|
||||
@@ -12,13 +19,11 @@ WORKDIR /app
|
||||
# 更新索引并安装替代包
|
||||
RUN apt-get update && apt-get install -y vim
|
||||
|
||||
RUN uv sync --frozen --no-cache
|
||||
|
||||
#CMD ["tail","-f","/dev/null"]
|
||||
# Run the application.
|
||||
CMD ["tail", "-f", "/dev/null"]
|
||||
#CMD ["/app/.venv/bin/gunicorn", "app.main:app", \
|
||||
# "-w", "4", \
|
||||
# "-k", "uvicorn.workers.UvicornWorker", \
|
||||
# "--bind", "0.0.0.0:80", \
|
||||
# "--access-logfile", "-", \
|
||||
# "--error-logfile", "-"]
|
||||
CMD ["gunicorn", "main:app_server", \
|
||||
"-w", "4", \
|
||||
"-k", "uvicorn.workers.UvicornWorker", \
|
||||
"--bind", "0.0.0.0:80", \
|
||||
"--access-logfile", "-", \
|
||||
"--error-logfile", "-"]
|
||||
Reference in New Issue
Block a user