feat: Update Dockerfile to use new UV system
Also fixes error in spotify refreshing
This commit is contained in:
24
Dockerfile
24
Dockerfile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user