SHA256
1
0

Make roles more reusable

This commit is contained in:
2026-01-29 02:49:52 -05:00
parent 4436599693
commit 44261c95fb
60 changed files with 1273 additions and 353 deletions

View File

@@ -0,0 +1,42 @@
- name: sabnzbd
type: build
image: localhost/sabnzbd:latest
pull: missing
format: oci
force_rm: true
container_file: |
FROM {{ alpine_base_image }}
LABEL maintainer="{{ maintainer }}"
RUN \
rm -rf /etc/apk/repositories \
&& apk add --no-cache \
-X "{{ alpine_mirror }}/v{{ alpine_base_image.split(':')[-1] }}/main" \
-X "{{ alpine_mirror }}/v{{ alpine_base_image.split(':')[-1] }}/community" \
python3 py3-pip git unzip ca-certificates par2cmdline 7zip \
&& apk add --no-cache --virtual=.build-deps \
-X "{{ alpine_mirror }}/v{{ alpine_base_image.split(':')[-1] }}/main" \
-X "{{ alpine_mirror }}/v{{ alpine_base_image.split(':')[-1] }}/community" \
autoconf automake build-base openssl-dev libffi-dev python3-dev \
&& apk add --no-cache -X '{{ alpine_mirror }}/v3.14/main' unrar \
&& git clone --depth 1 --branch master https://github.com/sabnzbd/sabnzbd /app \
&& python3 -m venv /venv \
&& . /venv/bin/activate \
&& pip install --no-cache-dir -r /app/requirements.txt \
&& apk del --purge .build-deps
- name: sabnzbd
type: container
image: localhost/sabnzbd:latest
volumes:
- "{{ config_root }}/sabnzbd:/config:Z"
- "{{ download_root }}/htpc:/downloads:z"
- "{{ monitor_root }}/nzbs:/nzbs:Z"
env:
TZ: "{{ tz }}"
command:
- "/venv/bin/python"
- "-OO"
- "/app/SABnzbd.py"
- "--config-file=/config/sabnzbd.ini"
- "--browser=0"
restart_policy: on-failure