Skip to content

Commit

Permalink
chore: try fixing docker build
Browse files Browse the repository at this point in the history
Signed-off-by: Akhil Narang <[email protected]>
  • Loading branch information
akhilnarang committed Sep 7, 2024
1 parent dd131f5 commit b8ab4f1
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
FROM python:3.12-slim AS build
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
COPY . /app
WORKDIR /app
RUN uv sync --frozen --no-cache

FROM python:3.12-slim
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
RUN groupadd -g 999 vlrscraper && useradd -r -u 999 -g vlrscraper vlrscraper
RUN mkdir /app && chown vlrscraper:vlrscraper /app
COPY . /app
WORKDIR /app
COPY --chown=vlrscraper:vlrscraper --from=build app/.venv ./.venv
COPY --chown=vlrscraper:vlrscraper . .
EXPOSE 8000
USER vlrscraper
RUN uv sync --frozen --no-cache
EXPOSE 8000
RUN uv run gunicorn -k uvicorn.workers.UvicornWorker --workers=$(( $(nproc) * 2 + 1 )) --bind=0.0.0.0 app.main:app

0 comments on commit b8ab4f1

Please sign in to comment.