feat: Update Dockerfile to use new UV system
All checks were successful
Check Code Quality / RuffCheck (push) Successful in 2m44s
Build Docker / BuildImage (push) Successful in 3m15s

Also fixes error in spotify refreshing
This commit is contained in:
2025-11-01 12:17:25 +11:00
parent 1888160fa5
commit b8f3039629
3 changed files with 39 additions and 10 deletions

View File

@@ -1,18 +1,24 @@
FROM --platform=$BUILDPLATFORM python:3.13-alpine AS builder
FROM --platform=$BUILDPLATFORM python:3.13-alpine
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN apk add curl
# Set working directory
WORKDIR /app
COPY requirements.txt /app
RUN --mount=type=cache,target=/root/.cache/pip \
python3 -m pip install -r requirements.txt
# Install dependencies
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
COPY . /app
# Copy the project into the image
ADD . /app
# Sync the project
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked
# Add mount point for data volume
# VOLUME /data
ENTRYPOINT ["python3"]
ENTRYPOINT ["uv", "run"]
CMD ["main.py"]
FROM builder AS dev-envs