mirror of
https://github.com/furyhawk/home_stack.git
synced 2026-07-21 18:26:54 +00:00
Bumps python from 3.10 to 3.13. --- updated-dependencies: - dependency-name: python dependency-version: '3.13' dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
38 lines
1.1 KiB
Docker
38 lines
1.1 KiB
Docker
FROM docker.io/python:3.13
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
WORKDIR /app/
|
|
|
|
# Install uv
|
|
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#installing-uv
|
|
COPY --from=ghcr.io/astral-sh/uv:0.5.11 /uv /uvx /bin/
|
|
|
|
# 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"
|
|
|
|
# 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
|
|
|
|
# Copy project files first so they're available for dependency installation
|
|
COPY ./pyproject.toml ./uv.lock ./alembic.ini /app/
|
|
|
|
# Install dependencies
|
|
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#intermediate-layers
|
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
uv pip install --system -e .
|
|
|
|
ENV PYTHONPATH=/app
|
|
|
|
# Copy application code and scripts
|
|
COPY ./scripts /app/scripts
|
|
COPY ./app /app/app
|
|
|
|
CMD ["fastapi", "run", "--workers", "4", "app/main.py"]
|