Skip to content

Commit

Permalink
v3ify deluge image and rebase to edge (linuxserver#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad authored Sep 1, 2022
1 parent cd820da commit 1d37e4a
Show file tree
Hide file tree
Showing 29 changed files with 142 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/external_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fi
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_DELUGE_MASTER\". ****"
echo "**** Retrieving external version ****"
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:'"deluge"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "**** Can't retrieve external version, exiting ****"
Expand Down
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.16
FROM ghcr.io/linuxserver/baseimage-alpine:edge

ARG UNRAR_VERSION=6.1.7
# set version label
ARG BUILD_DATE
ARG VERSION
ARG DELUGE_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"

Expand All @@ -22,7 +23,6 @@ RUN \
echo "**** install packages ****" && \
apk add --no-cache \
curl \
deluge \
geoip \
py3-pip \
python3 \
Expand All @@ -39,6 +39,12 @@ RUN \
cd /tmp/unrar && \
make && \
install -v -m755 unrar /usr/local/bin && \
if [ -z ${DELUGE_VERSION+x} ]; then \
DELUGE_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:deluge$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add -U --upgrade --no-cache \
deluge==${DELUGE_VERSION} && \
echo "**** install python packages ****" && \
pip3 install --no-cache-dir -U \
pip && \
Expand Down
10 changes: 8 additions & 2 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.16
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-edge

ARG UNRAR_VERSION=6.1.7
# set version label
ARG BUILD_DATE
ARG VERSION
ARG DELUGE_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"

Expand All @@ -22,7 +23,6 @@ RUN \
echo "**** install packages ****" && \
apk add --no-cache \
curl \
deluge \
geoip \
py3-pip \
python3 \
Expand All @@ -39,6 +39,12 @@ RUN \
cd /tmp/unrar && \
make && \
install -v -m755 unrar /usr/local/bin && \
if [ -z ${DELUGE_VERSION+x} ]; then \
DELUGE_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:deluge$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add -U --upgrade --no-cache \
deluge==${DELUGE_VERSION} && \
echo "**** install python packages ****" && \
pip3 install --no-cache-dir -U \
pip && \
Expand Down
10 changes: 8 additions & 2 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.16
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-edge

ARG UNRAR_VERSION=6.1.7
# set version label
ARG BUILD_DATE
ARG VERSION
ARG DELUGE_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"

Expand All @@ -22,7 +23,6 @@ RUN \
echo "**** install packages ****" && \
apk add --no-cache \
curl \
deluge \
geoip \
py3-pip \
python3 \
Expand All @@ -39,6 +39,12 @@ RUN \
cd /tmp/unrar && \
make && \
install -v -m755 unrar /usr/local/bin && \
if [ -z ${DELUGE_VERSION+x} ]; then \
DELUGE_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:deluge$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add -U --upgrade --no-cache \
deluge==${DELUGE_VERSION} && \
echo "**** install python packages ****" && \
pip3 install --no-cache-dir -U \
pip && \
Expand Down
8 changes: 4 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ pipeline {
DEV_DOCKERHUB_IMAGE = 'lsiodev/deluge'
PR_DOCKERHUB_IMAGE = 'lspipepr/deluge'
DIST_IMAGE = 'alpine'
DIST_TAG = '3.16'
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.16/community/'
DIST_TAG = 'edge'
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/edge/community/'
DIST_REPO_PACKAGES = 'deluge'
MULTIARCH='true'
CI='true'
CI_WEB='true'
CI_PORT='8112'
CI_SSL='false'
CI_DELAY='120'
CI_DOCKERENV='TZ=US/Pacific'
CI_DELAY='180'
CI_DOCKERENV='TZ=US/Pacific|S6_VERBOSITY=2'
CI_AUTH='user:password'
CI_WEBPATH=''
}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **29.08.22:** - Rebase to Alpine Edge again to follow latest releases.
* **12.08.22:** - Bump unrar to 6.1.7.
* **16.06.22:** - Rebase to Alpine 3.16 from edge.
* **22.02.22:** - Rebase to Alpine, config on first startup, add GeoIP.
Expand Down
6 changes: 3 additions & 3 deletions jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ repo_vars:
- DEV_DOCKERHUB_IMAGE = 'lsiodev/deluge'
- PR_DOCKERHUB_IMAGE = 'lspipepr/deluge'
- DIST_IMAGE = 'alpine'
- DIST_TAG = '3.16'
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.16/community/'
- DIST_TAG = 'edge'
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/edge/community/'
- DIST_REPO_PACKAGES = 'deluge'
- MULTIARCH='true'
- CI='true'
- CI_WEB='true'
- CI_PORT='8112'
- CI_SSL='false'
- CI_DELAY='120'
- CI_DELAY='300'
- CI_DOCKERENV='TZ=US/Pacific'
- CI_AUTH='user:password'
- CI_WEBPATH=''
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "29.08.22:", desc: "Rebase to Alpine Edge again to follow latest releases." }
- { date: "12.08.22:", desc: "Bump unrar to 6.1.7." }
- { date: "16.06.22:", desc: "Rebase to Alpine 3.16 from edge." }
- { date: "22.02.22:", desc: "Rebase to Alpine, config on first startup, add GeoIP." }
Expand Down
95 changes: 95 additions & 0 deletions root/defaults/core.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"file": 1,
"format": 1
}{
"add_paused": false,
"allow_remote": false,
"auto_manage_prefer_seeds": false,
"auto_managed": true,
"cache_expiry": 60,
"cache_size": 512,
"copy_torrent_file": false,
"daemon_port": 58846,
"del_copy_torrent_file": false,
"dht": true,
"dont_count_slow_torrents": false,
"download_location": "/downloads",
"download_location_paths_list": [],
"enabled_plugins": [],
"enc_in_policy": 1,
"enc_level": 2,
"enc_out_policy": 1,
"geoip_db_location": "/usr/share/GeoIP/GeoIP.dat",
"ignore_limits_on_local_network": true,
"info_sent": 0.0,
"listen_interface": "",
"listen_ports": [
6881,
6891
],
"listen_random_port": 51765,
"listen_reuse_port": true,
"listen_use_sys_port": false,
"lsd": true,
"max_active_downloading": 3,
"max_active_limit": 8,
"max_active_seeding": 5,
"max_connections_global": 200,
"max_connections_per_second": 20,
"max_connections_per_torrent": -1,
"max_download_speed": -1.0,
"max_download_speed_per_torrent": -1,
"max_half_open_connections": 50,
"max_upload_slots_global": 4,
"max_upload_slots_per_torrent": -1,
"max_upload_speed": -1.0,
"max_upload_speed_per_torrent": -1,
"move_completed": false,
"move_completed_path": "/downloads",
"move_completed_paths_list": [],
"natpmp": true,
"new_release_check": true,
"outgoing_interface": "",
"outgoing_ports": [
0,
0
],
"path_chooser_accelerator_string": "Tab",
"path_chooser_auto_complete_enabled": true,
"path_chooser_max_popup_rows": 20,
"path_chooser_show_chooser_button_on_localhost": true,
"path_chooser_show_hidden_files": false,
"peer_tos": "0x00",
"plugins_location": "/config/plugins",
"pre_allocate_storage": false,
"prioritize_first_last_pieces": false,
"proxy": {
"anonymous_mode": false,
"force_proxy": false,
"hostname": "",
"password": "",
"port": 8080,
"proxy_hostnames": true,
"proxy_peer_connections": true,
"proxy_tracker_connections": true,
"type": 0,
"username": ""
},
"queue_new_to_top": false,
"random_outgoing_ports": true,
"random_port": true,
"rate_limit_ip_overhead": true,
"remove_seed_at_ratio": false,
"seed_time_limit": 180,
"seed_time_ratio_limit": 7.0,
"send_info": false,
"sequential_download": false,
"share_ratio_limit": 2.0,
"shared": false,
"stop_seed_at_ratio": false,
"stop_seed_ratio": 2.0,
"super_seeding": false,
"torrentfiles_location": "/config/torrents",
"upnp": true,
"utpex": true
}
Empty file.
Empty file.
4 changes: 4 additions & 0 deletions root/etc/cont-init.d/30-config → root/etc/s6-overlay/s6-rc.d/init-deluge/run
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/with-contenv bash

if [[ ! -f /config/core.conf ]]; then
cp /defaults/core.conf /config/core.conf
fi

# permissions
chown -R abc:abc \
/config
Expand Down
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/init-deluge/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/init-deluge/up
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-deluge/run
Empty file.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-deluge-web/notification-fd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

DELUGE_LOGLEVEL=${DELUGE_LOGLEVEL:-warning}


exec \
s6-notifyoncheck -d -n 60 -w 5000 -c "nc -z 127.0.0.1 8112" \
s6-setuidgid abc /usr/bin/deluge-web \
-d -c /config --loglevel="${DELUGE_LOGLEVEL}"
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-deluge-web/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
Empty file.
Empty file.
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-deluged/notification-fd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ _term() {
echo "Tell Deluged to shut down."
pid=$(pidof deluged)
deluge-console --config=/config halt
# terminate when the transmission-daemon process dies
# terminate when the deluged process dies
tail --pid=${pid} -f /dev/null
}

DELUGE_LOGLEVEL=${DELUGE_LOGLEVEL:-info}

exec \
s6-notifyoncheck -d -n 60 -w 5000 -c "nc -z 127.0.0.1 58846" \
s6-setuidgid abc /usr/bin/deluged -c /config \
-d --loglevel="${DELUGE_LOGLEVEL}"
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-deluged/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
Empty file.
Empty file.
Empty file.
11 changes: 0 additions & 11 deletions root/etc/services.d/apiping/run

This file was deleted.

0 comments on commit 1d37e4a

Please sign in to comment.