qbittorrent final

This commit is contained in:
Odmin 2019-11-21 02:39:13 +03:00
parent b851eb8431
commit 16e30f4dcb
18 changed files with 106 additions and 72 deletions

View File

@ -654,3 +654,21 @@ matrix:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build --compress -t epicmorg/staytus:latest staytus
- docker push epicmorg/staytus:latest
- name: qBitTorrent - latest
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build --compress -t epicmorg/qbittorrent:latest qbittorrent/latest
- docker push epicmorg/qbittorrent:latest
- name: qBitTorrent - unstable
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build --compress -t epicmorg/qbittorrent:unstable qbittorrent/latest
- docker push epicmorg/qbittorrent:unstable
- name: qBitTorrent - stable
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build --compress -t epicmorg/qbittorrent:stable qbittorrent/stable
- docker push epicmorg/qbittorrent:stable

View File

@ -1,27 +0,0 @@
#!/bin/bash
: ${QBT_PROFILES_DIR:=/opt/qbittorrent/profiles}
: ${QBT_PROFILE_NAME:=docker}
: ${SMB_ENABLED:=false}
: ${SMB_DIR:=/mnt/smb}
: ${SMB_IP:=10.10.10.10}
: ${SMB_USER:=admin}
: ${SMB_PASS:=password}
: ${SMB_WORKGROUP:=WORKGROUP}
: ${SMB_BIND:=/remote/folder}
#mounting
case $SMB_ENABLED in
true)
echo "SMB Mount enabled - trying to mount"
mount.cifs //${SMB_IP}${{SMB_BIND} ${SMB_DIR} -o username=${SMB_USER},password=${SMB_PASS},domain=${SMB_WORKGROUP},iocharset=utf8,file_mode=0777,dir_mode=0777,noperm,mapchars
;;
false)
echo "SMD Disabled - skipping"
;;
esac
#starting torrent
qbittorrent-nox --profile=${QBT_PROFILES_DIR} --configuration=${QBT_PROFILE_NAME} --webui-port=8080

View File

@ -1,27 +0,0 @@
#!/bin/bash
: ${QBT_PROFILES_DIR:=/opt/qbittorrent/profiles}
: ${QBT_PROFILE_NAME:=docker}
: ${SMB_ENABLED:=false}
: ${SMB_DIR:=/mnt/smb}
: ${SMB_IP:=10.10.10.10}
: ${SMB_USER:=admin}
: ${SMB_PASS:=password}
: ${SMB_WORKGROUP:=WORKGROUP}
: ${SMB_BIND:=/remote/folder}
#mounting
case $SMB_ENABLED in
true)
echo "SMB Mount enabled - trying to mount"
mount.cifs //${SMB_IP}${{SMB_BIND} ${SMB_DIR} -o username=${SMB_USER},password=${SMB_PASS},domain=${SMB_WORKGROUP},iocharset=utf8,file_mode=0777,dir_mode=0777,noperm,mapchars
;;
false)
echo "SMD Disabled - skipping"
;;
esac
#starting torrent
qbittorrent-nox --profile=${QBT_PROFILES_DIR} --configuration=${QBT_PROFILE_NAME} --webui-port=8080

View File

@ -5,14 +5,12 @@ ARG DEBIAN_FRONTEND=noninteractive
##################################################################
# ARGuments
##################################################################
ENV BuildDocker true
ARG SMB_DIR=/mnt/smb
ARG QBT_DIR=/opt/qbittorrent
##################################################################
# Files and folders
##################################################################
RUN mkdir -p ${SMB_DIR} ${QBT_DIR}
RUN mkdir -p ${QBT_DIR}
##################################################################
# qBitTorrent sources list
@ -26,10 +24,7 @@ RUN apt autoremove -y && apt update && apt dist-upgrade -y
##################################################################
RUN apt-get update && \
apt install -y --allow-unauthenticated --allow-downgrades \
qbittorrent-nox \
ntfs-3g \
winbind \
cifs-utils
qbittorrent-nox
##################################################################
@ -47,6 +42,7 @@ RUN apt clean -y && \
VOLUME ${QBT_DIR}
EXPOSE 8080
EXPOSE 8282
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT /entrypoint.sh

View File

@ -5,7 +5,7 @@ services:
restart: always
container_name: qbittorrent
ports:
- "0.0.0.0:8080:8080"
- "0.0.0.0:8282:8282"
volumes:
- /etc/localtime:/etc/localtime
- /etc/timezone:/etc/timezone
@ -15,9 +15,4 @@ services:
- /tmp
environment:
- QBT_PROFILE_NAME=docker
- SMB_ENABLED=true
- SMB_IP=10.10.10.10
- SMB_USER=admin
- SMB_PASS=password
- SMB_WORKGROUP=WORKGROUP
- SMB_BIND=/remote/folder

View File

@ -0,0 +1,7 @@
#!/bin/bash
: ${QBT_PROFILES_DIR:=/opt/qbittorrent/profiles}
: ${QBT_PROFILE_NAME:=docker}
echo "Starting qBitTorrent..."
qbittorrent-nox --profile=${QBT_PROFILES_DIR} --configuration=${QBT_PROFILE_NAME} --webui-port=8282

View File

@ -0,0 +1,48 @@
FROM epicmorg/devel
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
ARG DEBIAN_FRONTEND=noninteractive
##################################################################
# ARGuments
##################################################################
ARG QBT_DIR=/opt/qbittorrent
##################################################################
# Files and folders
##################################################################
RUN mkdir -p ${QBT_DIR}
##################################################################
# qBitTorrent sources list
##################################################################
RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com D35164147CA69FC4
COPY qbittorrent-stable.list /etc/apt/sources.list.d/qbittorrent-stable.list
RUN apt autoremove -y && apt update && apt dist-upgrade -y
############################# ####################################
# qbittorrent install
##################################################################
RUN apt-get update && \
apt install -y --allow-unauthenticated --allow-downgrades \
qbittorrent-nox
##################################################################
# other customisations
##################################################################
##################################################################
# cleaninig up
##################################################################
RUN apt clean -y && \
apt autoclean -y && \
rm -rfv /var/lib/apt/lists/* && \
rm -rfv /var/cache/apt/archives/*.deb
VOLUME ${QBT_DIR}
EXPOSE 8282
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT /entrypoint.sh

View File

@ -1,4 +1,4 @@
all: emgqb
emgqb:
docker build --compress -t epicmorg/qbittorrent:stable .
docker push epicmorg/qbittorrent:stable

View File

@ -0,0 +1,18 @@
version: '3.7'
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

View File

@ -0,0 +1,7 @@
#!/bin/bash
: ${QBT_PROFILES_DIR:=/opt/qbittorrent/profiles}
: ${QBT_PROFILE_NAME:=docker}
echo "Starting qBitTorrent..."
qbittorrent-nox --profile=${QBT_PROFILES_DIR} --configuration=${QBT_PROFILE_NAME} --webui-port=8282