···11+FROM python:3.12-alpine
22+COPY --from=ghcr.io/astral-sh/uv:0.7.12 /uv /uvx /bin/
33+44+WORKDIR /app
55+66+# Install build tools & runtime dependencies
77+RUN apk add --no-cache \
88+ ffmpeg \
99+ file \
1010+ libmagic
1111+1212+# Enable bytecode compilation
1313+ENV UV_COMPILE_BYTECODE=1
1414+1515+# Copy from the cache instead of linking since it's a mounted volume
1616+ENV UV_LINK_MODE=copy
1717+1818+# Install the project's dependencies using the lockfile and settings
1919+RUN --mount=type=cache,target=/root/.cache/uv \
2020+ --mount=type=bind,source=uv.lock,target=uv.lock \
2121+ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
2222+ uv sync --locked --no-install-project --no-dev
2323+2424+# Define app data volume
2525+VOLUME /app/data
2626+2727+# Then, add the rest of the project source code and install it
2828+COPY . /app
2929+RUN --mount=type=cache,target=/root/.cache/uv \
3030+ uv sync --locked --no-dev
3131+3232+# Place executables in the environment at the front of the path
3333+ENV PATH="/app/.venv/bin:$PATH"
3434+3535+# Set entrypoint to run the app using uv
3636+ENTRYPOINT ["uv", "run", "main.py"]