Files
full-stack-fastapi-template/backend/Dockerfile
T
dependabot[bot] e954f777c1 ⬆ Bump the docker group across 2 directories with 2 updates
Bumps the docker group with 1 update in the /backend directory: python.
Bumps the docker group with 1 update in the /frontend directory: playwright.


Updates `python` from 3.10 to 3.14.6

Updates `playwright` from v1.58.2-noble to v1.61.0-noble

---
updated-dependencies:
- dependency-name: playwright
  dependency-version: v1.60.0-noble
  dependency-type: direct:production
  dependency-group: docker
- dependency-name: python
  dependency-version: 3.14.5
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: docker
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-20 10:12:51 +00:00

46 lines
1.4 KiB
Docker

FROM python:3.14.6
ENV PYTHONUNBUFFERED=1
# Install uv
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#installing-uv
COPY --from=ghcr.io/astral-sh/uv:0.9.26 /uv /uvx /bin/
# Compile bytecode
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#compiling-bytecode
ENV UV_COMPILE_BYTECODE=1
# uv Cache
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#caching
ENV UV_LINK_MODE=copy
WORKDIR /app/
# Place executables in the environment at the front of the path
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#using-the-environment
ENV PATH="/app/.venv/bin:$PATH"
# Install dependencies
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#intermediate-layers
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-workspace --package app
COPY ./backend/scripts /app/backend/scripts
COPY ./backend/pyproject.toml ./backend/alembic.ini /app/backend/
COPY ./backend/app /app/backend/app
# Sync the project
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#intermediate-layers
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 --package app
WORKDIR /app/backend/
CMD ["fastapi", "run", "--workers", "4", "app/main.py"]