diff --git a/.github/workflows/epicmorg.ecosystem.images.qbittorrent.yml b/.github/workflows/epicmorg.ecosystem.images.qbittorrent.yml index 037588007..8b5063503 100644 --- a/.github/workflows/epicmorg.ecosystem.images.qbittorrent.yml +++ b/.github/workflows/epicmorg.ecosystem.images.qbittorrent.yml @@ -16,7 +16,7 @@ jobs: '4.4.0', '4.4.1', '4.4.2', '4.4.3.1', '4.4.4', '4.4.5', '4.5.0', '4.5.1', '4.5.2', '4.5.3', '4.5.4', '4.5.5', '4.6.0', '4.6.1', '4.6.2', '4.6.3', '4.6.4', '4.6.5', '4.6.6', '4.6.7', - '5.0.0', '5.0.1', '5.0.2', '5.0.3', '5.0.4', '5.0.5' + '5.0.0', '5.0.1', '5.0.2', '5.0.3', '5.0.4', '5.0.5', '5.1.0' ] steps: - uses: actions/checkout@v4 diff --git a/linux/ecosystem/qbittorrent/5.1.0/Dockerfile b/linux/ecosystem/qbittorrent/5.1.0/Dockerfile new file mode 100644 index 000000000..2476c95c3 --- /dev/null +++ b/linux/ecosystem/qbittorrent/5.1.0/Dockerfile @@ -0,0 +1,60 @@ +FROM quay.io/epicmorg/debian:bookworm +LABEL maintainer="EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ENV QBT_VERSION=5.1.0 +ENV QBT_LIBTORRENT_VERSION=2.0.11 +ENV QBT_URL=https://github.com/userdocs/qbittorrent-nox-static/releases/download/release-${QBT_VERSION}_v${QBT_LIBTORRENT_VERSION}/x86_64-qbittorrent-nox + +ENV QBT_DIR=/opt/qbittorrent +ENV QBT_PORT_WEBUI=8282 +ENV QBT_PORT_TRACKER=9000 +ENV QBT_PORT_NAT=1337 +ENV QBT_PROTOCOL=http + +################################################################## +# Files and folders +################################################################## +RUN mkdir -p ${QBT_DIR} + +############################# #################################### +# qbittorrent install +################################################################## +RUN wget --no-check-certificate -nv --random-wait --retry-connrefused --continue ${QBT_URL} -O /usr/bin/qbittorrent-nox && \ + chmod +x /usr/bin/qbittorrent-nox && \ + qbittorrent-nox --version + +################################################################## +# other customisations +################################################################## + +################################################################## +# cleaninig up +################################################################## +RUN echo "clean up" && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /root/tmp/* && \ + rm -rfv /tmp/* + +VOLUME ${QBT_DIR} + +#healthcheck. good practice +HEALTHCHECK --interval=2m --timeout=3s CMD curl --insecure -f ${QBT_PROTOCOL}://localhost:${QBT_PORT_WEBUI}/ || exit 1 + +# Add image configuration and scripts +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh +RUN chmod 755 /usr/bin/docker-entrypoint.sh + +RUN updatedb + +#Final config +EXPOSE ${QBT_PORT_WEBUI} ${QBT_PORT_WEBUI}/udp ${QBT_PORT_NAT} ${QBT_PORT_NAT}/udp ${QBT_PORT_TRACKER} ${QBT_PORT_TRACKER}/udp + +ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"] +CMD ["docker-entrypoint.sh"] diff --git a/linux/ecosystem/qbittorrent/5.1.0/Dockerfile.libtorrent1 b/linux/ecosystem/qbittorrent/5.1.0/Dockerfile.libtorrent1 new file mode 100644 index 000000000..41655edad --- /dev/null +++ b/linux/ecosystem/qbittorrent/5.1.0/Dockerfile.libtorrent1 @@ -0,0 +1,60 @@ +FROM quay.io/epicmorg/debian:bookworm +LABEL maintainer="EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ENV QBT_VERSION=5.1.0 +ENV QBT_LIBTORRENT_VERSION=1.2.20 +ENV QBT_URL=https://github.com/userdocs/qbittorrent-nox-static/releases/download/release-${QBT_VERSION}_v${QBT_LIBTORRENT_VERSION}/x86_64-qbittorrent-nox + +ENV QBT_DIR=/opt/qbittorrent +ENV QBT_PORT_WEBUI=8282 +ENV QBT_PORT_TRACKER=9000 +ENV QBT_PORT_NAT=1337 +ENV QBT_PROTOCOL=http + +################################################################## +# Files and folders +################################################################## +RUN mkdir -p ${QBT_DIR} + +############################# #################################### +# qbittorrent install +################################################################## +RUN wget --no-check-certificate -nv --random-wait --retry-connrefused --continue ${QBT_URL} -O /usr/bin/qbittorrent-nox && \ + chmod +x /usr/bin/qbittorrent-nox && \ + qbittorrent-nox --version + +################################################################## +# other customisations +################################################################## + +################################################################## +# cleaninig up +################################################################## +RUN echo "clean up" && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /root/tmp/* && \ + rm -rfv /tmp/* + +VOLUME ${QBT_DIR} + +#healthcheck. good practice +HEALTHCHECK --interval=2m --timeout=3s CMD curl --insecure -f ${QBT_PROTOCOL}://localhost:${QBT_PORT_WEBUI}/ || exit 1 + +# Add image configuration and scripts +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh +RUN chmod 755 /usr/bin/docker-entrypoint.sh + +RUN updatedb + +#Final config +EXPOSE ${QBT_PORT_WEBUI} ${QBT_PORT_WEBUI}/udp ${QBT_PORT_NAT} ${QBT_PORT_NAT}/udp ${QBT_PORT_TRACKER} ${QBT_PORT_TRACKER}/udp + +ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"] +CMD ["docker-entrypoint.sh"] diff --git a/linux/ecosystem/qbittorrent/5.1.0/Makefile b/linux/ecosystem/qbittorrent/5.1.0/Makefile new file mode 100644 index 000000000..ff56425bb --- /dev/null +++ b/linux/ecosystem/qbittorrent/5.1.0/Makefile @@ -0,0 +1,44 @@ +all: app + +app: + make pip + make build + make deploy + make clean + +build: + make build-buildah + +deploy: + make deploy-buildah + +build-buildah: + buildah-wrapper --build --squash + +deploy-buildah: + buildah-wrapper --deploy + +build-kaniko: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:debug --dry-run + +deploy-kaniko: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:debug + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy-compose: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af + buildah rm -a + buildah rmi -a + +pip: + pip3 install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper + pip install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper \ No newline at end of file diff --git a/linux/ecosystem/qbittorrent/5.1.0/README.md b/linux/ecosystem/qbittorrent/5.1.0/README.md new file mode 100644 index 000000000..b2725f3cd --- /dev/null +++ b/linux/ecosystem/qbittorrent/5.1.0/README.md @@ -0,0 +1,78 @@ +## Build info + +The [Qbittorrent](https://www.qbittorrent.org/) project aims to provide an open-source software alternative to µTorrent. qBittorrent is based on the Qt toolkit and libtorrent-rasterbar library. + +[![qbittorrent](https://github.com/EpicMorg/docker-scripts/raw/master/qbittorrent/qbittorrent-icon.png)](https://www.qbittorrent.org/) + + +All presented images avalible on our repo in docker hub. + +* qbittorrent `latest`, `stable` and `unstable` images are also avalible here. + +### Environments + +````` +QBT_PROFILES_DIR=/opt/qbittorrent/profiles +QBT_PROFILE_NAME=docker +QBT_PORT_WEBUI=8282 +QBT_PORT_NAT=1337 +QBT_PORT_TRACKER=9000 +````` + +### Exampe + +``` yamlservices: + qbittorrent: + image: epicmorg/qbittorrent:latest + container_name: qbittorrent + hostname: qbittorrent + restart: always + ports: + - "8282:8282" + - "1337:1337/udp" + - "1337:1337/tcp" + - "9000:9000/udp" + - "9000:9000/tcp" + cap_add: + - ALL + volumes: + - /etc/letsencrypt:/etc/letsencrypt + - /opt/docker/data/qbt/profiles:/opt/qbittorrent/profiles + environment: + - QBT_PROFILE_NAME=docker + - QBT_PORT_WEBUI=8282 + - QBT_PORT_NAT=1337 + - QBT_PORT_TRACKER=9000 + tmpfs: + - /tmp +``` + + +### Ngnix + +``` +server { + + listen 443 ssl http2; + + server_name torrent.domain.tld; + + ssl_certificate /etc/ssl/torrent.domain.tld.fullchain.crt; + ssl_certificate_key /etc/ssl/torrent.domain.tld.key; + + location / { + + proxy_pass http://qbittorrent:8282; + proxy_http_version 1.1; + + proxy_set_header Host 127.0.0.1:8282; + proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_cookie_path / "/; Secure"; + + client_max_body_size 0; + + } +} + +``` diff --git a/linux/ecosystem/qbittorrent/5.1.0/docker-compose.example.yml b/linux/ecosystem/qbittorrent/5.1.0/docker-compose.example.yml new file mode 100644 index 000000000..8be77e17d --- /dev/null +++ b/linux/ecosystem/qbittorrent/5.1.0/docker-compose.example.yml @@ -0,0 +1,17 @@ +services: + qbittorrent: + image: epicmorg/qbittorrent:latest + restart: always + container_name: qbittorrent + ports: + - "0.0.0.0:8282:8282" + volumes: + - /etc/localtime:/etc/localtime + - /etc/timezone:/etc/timezone + - /etc/letsencrypt:/etc/letsencrypt + - /opt/qbittorrent/profiles:/opt/qbittorrent/profiles + tmpfs: + - /tmp + environment: + - QBT_PROFILE_NAME=docker + diff --git a/linux/ecosystem/qbittorrent/5.1.0/docker-compose.yml b/linux/ecosystem/qbittorrent/5.1.0/docker-compose.yml new file mode 100644 index 000000000..d79b5ca37 --- /dev/null +++ b/linux/ecosystem/qbittorrent/5.1.0/docker-compose.yml @@ -0,0 +1,14 @@ +services: + qbt: + image: "quay.io/epicmorg/qbittorrent:5.1.0" + build: + context: . + qbt-libtorrent2: + image: "quay.io/epicmorg/qbittorrent:5.1.0-libtorrent2.0.11" + build: + context: . + qbt-libtorrent1: + image: "quay.io/epicmorg/qbittorrent:5.1.0-libtorrent1.2.20" + build: + context: . + dockerfile: ./Dockerfile.libtorrent1 diff --git a/linux/ecosystem/qbittorrent/5.1.0/docker-entrypoint.sh b/linux/ecosystem/qbittorrent/5.1.0/docker-entrypoint.sh new file mode 100644 index 000000000..d916b0e86 --- /dev/null +++ b/linux/ecosystem/qbittorrent/5.1.0/docker-entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +: ${QBT_DIR:=/opt/qbittorrent} +: ${QBT_PROFILES_DIR:=/opt/qbittorrent/profiles} +: ${QBT_PROFILE_NAME:=docker} +: ${QBT_PORT_WEBUI:=8282} +: ${QBT_PORT_NAT:=1337} +: ${QBT_PORT_TRACKER:=9000} + +echo "======================================================" +echo "[qbittorrent] Starting `qbittorrent-nox -v`..." +echo "======================================================" + +tail -n 512 -f ${QBT_PROFILES_DIR}/qBittorrent_${QBT_PROFILE_NAME}/data/logs/* & +exec qbittorrent-nox --profile=${QBT_PROFILES_DIR} --configuration=${QBT_PROFILE_NAME} --webui-port=${QBT_PORT_WEBUI} diff --git a/linux/ecosystem/qbittorrent/5.1.0/qbittorrent-icon.png b/linux/ecosystem/qbittorrent/5.1.0/qbittorrent-icon.png new file mode 100644 index 000000000..77d06fd31 Binary files /dev/null and b/linux/ecosystem/qbittorrent/5.1.0/qbittorrent-icon.png differ