mirror of
https://github.com/nikdoof/ohayodash.git
synced 2025-12-11 09:02:18 +00:00
19 lines
668 B
Docker
19 lines
668 B
Docker
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim AS builder
|
|
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
|
|
ENV UV_PYTHON_DOWNLOADS=0
|
|
WORKDIR /app
|
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
--mount=type=bind,source=uv.lock,target=uv.lock \
|
|
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
|
uv sync --locked --no-install-project --no-dev
|
|
COPY . /app
|
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
uv sync --locked --no-dev
|
|
|
|
|
|
FROM python:3.13-slim-bookworm
|
|
COPY --from=builder --chown=app:app /app /app
|
|
ENV PATH="/app/.venv/bin:$PATH"
|
|
EXPOSE 8000/tcp
|
|
CMD ["gunicorn", "ohayodash.app:app", "-b", "0.0.0.0:8000", "--access-logfile", "-"]
|