diff --git a/linux/ecosystem/qbittorrent/4.6.4/.env b/linux/ecosystem/qbittorrent/4.6.4/.env new file mode 100644 index 000000000..44507b0f8 --- /dev/null +++ b/linux/ecosystem/qbittorrent/4.6.4/.env @@ -0,0 +1,3 @@ +QBT_RELEASE=4.6.4 +LT1_RELEASE=1.2.19 +LT2_RELEASE=2.0.10 diff --git a/linux/ecosystem/qbittorrent/4.6.4/Dockerfile b/linux/ecosystem/qbittorrent/4.6.4/Dockerfile new file mode 100644 index 000000000..465a73391 --- /dev/null +++ b/linux/ecosystem/qbittorrent/4.6.4/Dockerfile @@ -0,0 +1,62 @@ +FROM epicmorg/debian:bookworm +LABEL maintainer="EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG QBT_RELEASE +ARG LT_RELEASE +ENV QBT_VERSION=${QBT_RELEASE} +ENV QBT_LIBTORRENT_VERSION=${LT_RELEASE} +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 apt clean -y && \ + apt autoclean -y && \ + rm -rf /var/lib/apt/lists/* && \ + rm -rf /var/cache/apt/archives/*.deb && \ + rm -rf /builds/* && \ + rm -rf /valve/* + +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 + +#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/4.6.4/Makefile b/linux/ecosystem/qbittorrent/4.6.4/Makefile new file mode 100644 index 000000000..89eb81b08 --- /dev/null +++ b/linux/ecosystem/qbittorrent/4.6.4/Makefile @@ -0,0 +1,33 @@ +all: app + +app: + make build + make deploy + make clean + +build: + make qbt-libtorrent2 + make qbt + make qbt-libtorrent1 + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af + +qbt: + docker-compose build --compress --parallel --progress plain qbt + docker-compose push qbt + +qbt-libtorrent2: + docker-compose build --compress --parallel --progress plain qbt-libtorrent2 + docker-compose push qbt-libtorrent2 + +qbt-libtorrent1: + docker-compose build --compress --parallel --progress plain qbt-libtorrent1 + docker-compose push qbt-libtorrent1 diff --git a/linux/ecosystem/qbittorrent/4.6.4/README.md b/linux/ecosystem/qbittorrent/4.6.4/README.md new file mode 100644 index 000000000..2e7cd4855 --- /dev/null +++ b/linux/ecosystem/qbittorrent/4.6.4/README.md @@ -0,0 +1,80 @@ +## 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 + +``` yaml +version: '3.9' +services: + 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/4.6.4/docker-compose.example.yml b/linux/ecosystem/qbittorrent/4.6.4/docker-compose.example.yml new file mode 100644 index 000000000..087b81725 --- /dev/null +++ b/linux/ecosystem/qbittorrent/4.6.4/docker-compose.example.yml @@ -0,0 +1,18 @@ +version: '3' +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/4.6.4/docker-compose.yml b/linux/ecosystem/qbittorrent/4.6.4/docker-compose.yml new file mode 100644 index 000000000..648bdd79f --- /dev/null +++ b/linux/ecosystem/qbittorrent/4.6.4/docker-compose.yml @@ -0,0 +1,23 @@ +version: '3' +services: + qbt: + image: "epicmorg/qbittorrent:${QBT_RELEASE}" + build: + context: . + args: + QBT_RELEASE: ${QBT_RELEASE} + LT_RELEASE: ${LT2_RELEASE} + qbt-libtorrent2: + image: "epicmorg/qbittorrent:${QBT_RELEASE}-libtorrent${LT2_RELEASE}" + build: + context: . + args: + QBT_RELEASE: ${QBT_RELEASE} + LT_RELEASE: ${LT2_RELEASE} + qbt-libtorrent1: + image: "epicmorg/qbittorrent:${QBT_RELEASE}-libtorrent${LT1_RELEASE}" + build: + context: . + args: + QBT_RELEASE: ${QBT_RELEASE} + LT_RELEASE: ${LT1_RELEASE} diff --git a/linux/ecosystem/qbittorrent/4.6.4/docker-entrypoint.sh b/linux/ecosystem/qbittorrent/4.6.4/docker-entrypoint.sh new file mode 100755 index 000000000..d916b0e86 --- /dev/null +++ b/linux/ecosystem/qbittorrent/4.6.4/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/4.6.4/qbittorrent-icon.png b/linux/ecosystem/qbittorrent/4.6.4/qbittorrent-icon.png new file mode 100644 index 000000000..77d06fd31 Binary files /dev/null and b/linux/ecosystem/qbittorrent/4.6.4/qbittorrent-icon.png differ