-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Akhil Narang <[email protected]>
- Loading branch information
1 parent
dd131f5
commit b8ab4f1
Showing
1 changed file
with
4 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|