42 lines
1.5 KiB
YAML
42 lines
1.5 KiB
YAML
- 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 |