diff --git a/DEPLOY.md b/DEPLOY.md index cff3297..bb7e4a3 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -27,8 +27,8 @@ default, e.g. via QEMU emulation). ```sh docker buildx build --platform linux/amd64 \ - --build-arg VERSION=1.10 \ - -t 192.168.2.212:3000/tigeren/metube:1.10 \ + --build-arg VERSION=1.11 \ + -t 192.168.2.212:3000/tigeren/metube:1.11 \ --push . ``` diff --git a/Dockerfile b/Dockerfile index 47b8c07..a3b06b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,23 +12,30 @@ FROM python:3.13-slim WORKDIR /app -COPY pyproject.toml uv.lock docker-entrypoint.sh ./ - -# Use sed to strip carriage-return characters from the entrypoint script (in case building on Windows) -# Install dependencies -RUN sed -i 's/\r$//g' docker-entrypoint.sh && \ - chmod +x docker-entrypoint.sh && \ +# Heavy system dependencies in their own layer, independent of app/dep files, +# so it stays cached unless this block itself changes. +# apt caches are BuildKit cache mounts: even when this layer is invalidated, +# package downloads are reused instead of hitting deb.debian.org again. +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ apt-get update && \ apt-get install -y --no-install-recommends ffmpeg aria2 curl tini gosu ca-certificates unzip \ chromium libnss3 libfreetype6 libharfbuzz0b fonts-freefont-ttf && \ ln -s /usr/sbin/gosu /usr/local/bin/su-exec && \ curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/usr/local sh && \ pip install --no-cache-dir uv && \ - UV_PROJECT_ENVIRONMENT=/usr/local uv sync --frozen --no-dev --compile-bytecode --extra headless && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* && \ mkdir /.cache && chmod 777 /.cache +# Python dependencies: only invalidated when pyproject.toml/uv.lock change. +# The uv cache mount makes re-resolving after a lockfile change much faster. +COPY pyproject.toml uv.lock ./ +RUN --mount=type=cache,target=/root/.cache/uv \ + UV_PROJECT_ENVIRONMENT=/usr/local uv sync --frozen --no-dev --compile-bytecode --extra headless + +# Use sed to strip carriage-return characters from the entrypoint script (in case building on Windows) +COPY docker-entrypoint.sh ./ +RUN sed -i 's/\r$//g' docker-entrypoint.sh && chmod +x docker-entrypoint.sh + COPY app ./app COPY --from=builder /metube/dist/metube ./ui/dist/metube diff --git a/ui/src/app/app.component.html b/ui/src/app/app.component.html index c7856b5..9b6ad53 100644 --- a/ui/src/app/app.component.html +++ b/ui/src/app/app.component.html @@ -313,11 +313,27 @@ -
Downloading
-
+ + +
+
- +
+ + +
@@ -374,15 +390,19 @@
+
-
Completed
-
+
+
- +
+ + +
@@ -450,6 +470,7 @@
+