mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-09-06 05:04:38 +08:00
# Requirements Updated - "humanize==4.13.0" - "ruff==0.12.11" # Breaking Changes - **DEPRECATE `QBT_CONFIG` / `--config-file` OPTION** - No longer supporting `QBT_CONFIG` / `--config-file`. Instead please switch over to **`QBT_CONFIG_DIR` / `--config-dir`**. - `QBT_CONFIG` / `--config-file` option will still work for now but is now considered legacy and will be removed in a future release. - **Note**: All yml/yaml files will be treated as valid configuration files and loaded in the `QBT_CONFIG_DIR` path. Please ensure you **remove** any old/unused configurations that you don't want to be loaded prior to using this path. # Improvements - Adds docker support for PUID/PGID environment variables - Dockerfile copies the latest `config.yml.sample` in the config folder - Add `QBT_HOST` / `--host` option to specify webUI host address (#929 Thanks to @QuixThe2nd) - WebUI: Quick action settings persist now # Bug Fixes - WebUI: Fix loading spinner to be centered in the webUI **Full Changelog**: https://github.com/StuffAnThings/qbit_manage/compare/v4.5.5...v4.6.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Fabricio Silva <hi@fabricio.dev> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Parsa Yazdani <parsa@yazdani.au> Co-authored-by: Actionbot <actions@github.com>
76 lines
2.3 KiB
Docker
76 lines
2.3 KiB
Docker
# Use a multi-stage build to minimize final image size
|
|
FROM python:3.13-alpine as builder
|
|
|
|
ARG BRANCH_NAME=master
|
|
ENV BRANCH_NAME=${BRANCH_NAME}
|
|
ENV QBM_DOCKER=True
|
|
|
|
# Install build-time dependencies only
|
|
RUN apk add --no-cache \
|
|
gcc \
|
|
g++ \
|
|
libxml2-dev \
|
|
libxslt-dev \
|
|
zlib-dev \
|
|
curl \
|
|
bash
|
|
|
|
# Install UV (fast pip alternative)
|
|
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
|
|
# Copy only dependency files first (better layer caching)
|
|
COPY pyproject.toml setup.py VERSION /app/
|
|
WORKDIR /app
|
|
|
|
# Install project in a virtual env (lightweight & reproducible)
|
|
RUN /root/.local/bin/uv pip install --system .
|
|
|
|
# Final stage: minimal runtime image
|
|
FROM python:3.13-alpine
|
|
|
|
# Build arguments
|
|
ARG APP_VERSION
|
|
ARG BUILD_DATE
|
|
ARG VCS_REF
|
|
|
|
# OCI Image Specification labels
|
|
LABEL org.opencontainers.image.title="qbit-manage"
|
|
LABEL org.opencontainers.image.description="This tool will help manage tedious tasks in qBittorrent and automate them. Tag, categorize, remove Orphaned data, remove unregistered torrents and much much more."
|
|
LABEL org.opencontainers.image.version="$APP_VERSION"
|
|
LABEL org.opencontainers.image.created="$BUILD_DATE"
|
|
LABEL org.opencontainers.image.revision="$VCS_REF"
|
|
LABEL org.opencontainers.image.authors="bobokun"
|
|
LABEL org.opencontainers.image.vendor="StuffAnThings"
|
|
LABEL org.opencontainers.image.licenses="MIT"
|
|
LABEL org.opencontainers.image.url="https://github.com/StuffAnThings/qbit_manage"
|
|
LABEL org.opencontainers.image.documentation="https://github.com/StuffAnThings/qbit_manage/wiki"
|
|
LABEL org.opencontainers.image.source="https://github.com/StuffAnThings/qbit_manage"
|
|
LABEL org.opencontainers.image.base.name="python:3.13-alpine"
|
|
|
|
ENV TINI_VERSION=v0.19.0
|
|
|
|
|
|
# Runtime dependencies (smaller than build stage)
|
|
RUN apk add --no-cache \
|
|
tzdata \
|
|
bash \
|
|
curl \
|
|
jq \
|
|
tini \
|
|
su-exec \
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
# Copy installed packages and scripts from builder
|
|
COPY --from=builder /usr/local/lib/python3.13/site-packages/ /usr/local/lib/python3.13/site-packages/
|
|
COPY --from=builder /app /app
|
|
COPY . /app
|
|
COPY entrypoint.sh /app/entrypoint.sh
|
|
WORKDIR /app
|
|
RUN chmod +x /app/entrypoint.sh
|
|
VOLUME /config
|
|
|
|
# Expose port 8080
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["/sbin/tini", "-s", "/app/entrypoint.sh"]
|
|
CMD ["python3", "qbit_manage.py"]
|