Files
nginx-unit-logs-request-exp…/Dockerfile
T
akamoroz 5c3edc2faa
Build Docker Image / build-and-deploy-image (push) Successful in 10m7s
Full bump: Python 3.14, Alpine 3.24, all deps and pre-commit hooks
- Runtime image python:3.12-alpine -> python:3.14-alpine3.24
- Builder uv image -> python3.14-alpine
- requires-python >=3.14, ruff target-version py314, .python-version 3.14
- Deps: aiofiles 25.1.0, environs 15.0.1, granian 2.7.9, orjson 3.11.9,
  uvloop 0.22.1 (uv.lock regenerated with --upgrade)
- pre-commit hooks: pre-commit-hooks v6.0.0, hadolint v2.14.0, ruff v0.15.20
- Verified: image builds on musl (cp314 wheels), granian 2.x starts,
  /metrics returns 200, pre-commit run --all-files passes
2026-07-08 16:31:09 +03:00

27 lines
752 B
Docker

FROM ghcr.io/astral-sh/uv:python3.14-alpine AS builder
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
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 --frozen --no-install-project --no-dev
COPY pyproject.toml uv.lock /app/
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-dev
FROM python:3.14-alpine3.24
WORKDIR /app
# hadolint ignore=DL3018
RUN apk add --no-cache tini
ENV PATH="/app/.venv/bin:$PATH"
COPY --from=builder /app /app
COPY app.py /app/
EXPOSE 8000
ENTRYPOINT ["tini", "--"]
CMD ["granian", "--workers", "1", "--host", "0.0.0.0", "--interface", "asgi", "app:app"]