Skip to content

Commit 354ebb1

Browse files
Karitononedr0p
andauthored
add pyload-ng container (#813)
Co-authored-by: Devin Buhl <onedr0p@users.noreply.github.com>
1 parent d6bba17 commit 354ebb1

File tree

5 files changed

+197
-0
lines changed

5 files changed

+197
-0
lines changed

apps/pyload-ng/Dockerfile

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# syntax=docker/dockerfile:1
2+
3+
FROM docker.io/library/python:3.13-alpine3.22
4+
ARG VERSION
5+
6+
ENV \
7+
CRYPTOGRAPHY_DONT_BUILD_RUST=1 \
8+
PIP_BREAK_SYSTEM_PACKAGES=1 \
9+
PIP_DISABLE_PIP_VERSION_CHECK=1 \
10+
PIP_NO_CACHE_DIR=1 \
11+
PIP_ROOT_USER_ACTION=ignore \
12+
PYTHONDONTWRITEBYTECODE=1 \
13+
PYTHONUNBUFFERED=1 \
14+
UV_NO_CACHE=true \
15+
UV_SYSTEM_PYTHON=true \
16+
UV_EXTRA_INDEX_URL="https://wheel-index.linuxserver.io/alpine-3.22/"
17+
18+
ENV HOME="/config"
19+
20+
USER root
21+
WORKDIR /app
22+
23+
RUN \
24+
apk add --no-cache --virtual=build-dependencies \
25+
build-base \
26+
curl-dev \
27+
&& apk add --no-cache \
28+
catatonit \
29+
ffmpeg \
30+
libatomic \
31+
libcurl \
32+
libjpeg-turbo \
33+
7zip \
34+
sqlite \
35+
tesseract-ocr \
36+
&& pip install --no-cache-dir uv \
37+
&& uv pip install --pre pyload-ng[all]=="${VERSION}" \
38+
&& mkdir -p /config && chown nobody:nogroup -R /config \
39+
&& mkdir -p /downloads && chown nobody:nogroup -R /downloads \
40+
&& apk del --purge build-dependencies \
41+
&& rm -rf /root/.cache /tmp/*
42+
43+
COPY . /
44+
45+
COPY --from=ghcr.io/linuxserver/unrar:latest /usr/bin/unrar-alpine /usr/bin/unrar
46+
47+
USER nobody:nogroup
48+
WORKDIR /config
49+
50+
VOLUME ["/config"]
51+
52+
ENTRYPOINT ["/usr/bin/catatonit", "--", "/entrypoint.sh"]

apps/pyload-ng/defaults/pyload.cfg

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
version: 2
2+
3+
download - "Download":
4+
int chunks : "Maximum connections for one download" = 3
5+
time end_time : "End time" = 0:00
6+
ip interface : "Download interface to bind (IP Address)" =
7+
bool ipv6 : "Allow IPv6" = False
8+
bool limit_speed : "Limit download speed" = False
9+
int max_downloads : "Maximum parallel downloads" = 3
10+
int max_speed : "Maximum download speed in KiB/s" = -1
11+
bool skip_existing : "Skip already existing files" = False
12+
time start_time : "Start time" = 0:00
13+
14+
general - "General":
15+
debug;trace;stack debug_level : "Debug level" = trace
16+
bool debug_mode : "Debug mode" = True
17+
bool folder_per_package : "Create folder for each package" = True
18+
en; language : "Language" = en
19+
int min_free_space : "Minimum free space in MiB" = 1024
20+
bool ssl_verify : "Verify SSL certificates" = True
21+
folder storage_folder : "Download folder" = /downloads
22+
23+
log - "Log":
24+
bool console : "Print log to console" = True
25+
bool console_color : "Colorize console" = False
26+
bool filelog : "Save log to file" = True
27+
int filelog_entries : "Maximum log files" = 10
28+
folder filelog_folder : "Log file folder" =
29+
bool filelog_rotate : "Log rotate" = True
30+
int filelog_size : "Maximum file size (in KiB)" = 5120
31+
bool syslog : "Sent log to syslog" = False
32+
folder syslog_folder : "Syslog local folder" =
33+
ip syslog_host : "Syslog remote IP address" = localhost
34+
local;remote syslog_location : "Syslog location" = local
35+
int syslog_port : "Syslog remote port" = 514
36+
37+
permission - "Permissions":
38+
bool change_dl : "Change ownership of downloads" = False
39+
bool change_file : "Change permissions of downloads" = False
40+
bool change_group : "Change group of running process" = False
41+
bool change_user : "Change user of running process" = False
42+
str file : "Permission mode for downloaded files" = 0644
43+
str folder : "Permission mode for created folders" = 0755
44+
str group : "Groupname for ownership" = users
45+
str user : "Username for ownership" = user
46+
47+
proxy - "Proxy":
48+
bool enabled : "Activated" = False
49+
ip host : "IP address" = localhost
50+
password password : "Password" =
51+
int port : "Port" = 7070
52+
bool socks_resolve_dns : "Enable DNS resolution through SOCKS proxy" = False
53+
http;https;socks4;socks5 type : "Protocol" = http
54+
str username : "Username" =
55+
56+
reconnect - "Reconnection":
57+
bool enabled : "Activated" = False
58+
time end_time : "End time" = 0:00
59+
str script : "Script" =
60+
time start_time : "Start time" = 0:00
61+
62+
webui - "Web Interface":
63+
bool autologin : "Skip login if single user" = False
64+
bool develop : "Development mode" = False
65+
bool enabled : "Activated" = True
66+
ip host : "IP address" = 0.0.0.0
67+
int port : "Port" = 8000
68+
str prefix : "Path prefix" =
69+
int session_lifetime : "Session lifetime (minutes)" = 44640
70+
file ssl_certchain : "CA's intermediate certificate bundle (optional)" =
71+
file ssl_certfile : "SSL Certificate" = /config/data/ssl.crt
72+
file ssl_keyfile : "SSL Key" = /config/data/ssl.key
73+
Default;modern;pyplex theme : "Theme" = modern
74+
bool use_ssl : "Use HTTPS" = False

apps/pyload-ng/docker-bake.hcl

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
target "docker-metadata-action" {}
2+
3+
variable "APP" {
4+
default = "pyload-ng"
5+
}
6+
7+
variable "VERSION" {
8+
// renovate: datasource=pypi depName=pyload-ng
9+
default = "0.5.0b3.dev93"
10+
}
11+
12+
variable "SOURCE" {
13+
default = "https://github.com/pyload/pyload"
14+
}
15+
16+
group "default" {
17+
targets = ["image-local"]
18+
}
19+
20+
target "image" {
21+
inherits = ["docker-metadata-action"]
22+
args = {
23+
VERSION = "${VERSION}"
24+
}
25+
labels = {
26+
"org.opencontainers.image.source" = "${SOURCE}"
27+
}
28+
}
29+
30+
target "image-local" {
31+
inherits = ["image"]
32+
output = ["type=docker"]
33+
tags = ["${APP}:${VERSION}"]
34+
}
35+
36+
target "image-all" {
37+
inherits = ["image"]
38+
platforms = [
39+
"linux/amd64",
40+
"linux/arm64"
41+
]
42+
}

apps/pyload-ng/entrypoint.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env sh
2+
3+
if [ ! -f /config/settings/pyload.cfg ]; then
4+
mkdir /config/settings
5+
cp /defaults/pyload.cfg /config/settings/pyload.cfg
6+
fi
7+
8+
exec \
9+
python3 -m pyload \
10+
--userdir /config \
11+
--storagedir /downloads \
12+
--tempdir /tmp/pyload \
13+
"$@"

apps/pyload-ng/tests.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
# yaml-language-server: $schema=https://raw.githubusercontent.com/goss-org/goss/master/docs/schema.yaml
3+
process:
4+
python3:
5+
running: true
6+
file:
7+
/usr/local/bin/pyload:
8+
exists: true
9+
port:
10+
tcp:8000:
11+
listening: true
12+
tcp:9666:
13+
listening: true
14+
http:
15+
http://localhost:8000:
16+
status: 200

0 commit comments

Comments
 (0)