From 411dbb622404c22e3c349f562a7aec6293055053 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sun, 26 Feb 2023 16:10:48 +0000 Subject: [PATCH] Add dependencies for postgres support. Add mediainfo. --- Dockerfile | 14 ++++++++++---- Dockerfile.aarch64 | 14 ++++++++++---- Dockerfile.armhf | 14 ++++++++++---- README.md | 1 + readme-vars.yml | 1 + root/etc/s6-overlay/s6-rc.d/init-bazarr-config/run | 1 + root/etc/s6-overlay/s6-rc.d/svc-bazarr/run | 3 ++- 7 files changed, 35 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index cf6b81a..baf1d3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ RUN \ build-base \ cargo \ libffi-dev \ + libpq-dev \ libxml2-dev \ libxslt-dev \ python3-dev && \ @@ -26,6 +27,7 @@ RUN \ ffmpeg \ libxml2 \ libxslt \ + mediainfo \ python3 && \ echo "**** install unrar from source ****" && \ mkdir /tmp/unrar && \ @@ -39,6 +41,8 @@ RUN \ make && \ install -v -m755 unrar /usr/local/bin && \ echo "**** install bazarr ****" && \ + mkdir -p \ + /app/bazarr/bin && \ if [ -z ${BAZARR_VERSION+x} ]; then \ BAZARR_VERSION=$(curl -sX GET "https://api.github.com/repos/morpheus65535/bazarr/releases/latest" \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ @@ -46,20 +50,22 @@ RUN \ curl -o \ /tmp/bazarr.zip -L \ "https://github.com/morpheus65535/bazarr/releases/download/${BAZARR_VERSION}/bazarr.zip" && \ - mkdir -p \ - /app/bazarr/bin && \ unzip \ /tmp/bazarr.zip -d \ /app/bazarr/bin && \ rm -Rf /app/bazarr/bin/bin && \ echo "UpdateMethod=docker\nBranch=master\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/bazarr/package_info && \ + curl -o \ + /app/bazarr/bin/postgres-requirements.txt -L \ + "https://raw.githubusercontent.com/morpheus65535/bazarr/${BAZARR_VERSION}/postgres-requirements.txt" && \ echo "**** Install requirements ****" && \ python3 -m ensurepip && \ pip3 install -U --no-cache-dir \ pip \ wheel && \ - pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ -r \ - /app/bazarr/bin/requirements.txt && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \ + -r /app/bazarr/bin/requirements.txt \ + -r /app/bazarr/bin/postgres-requirements.txt && \ echo "**** clean up ****" && \ apk del --purge \ build-dependencies && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 1c51da2..bacc90d 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -18,6 +18,7 @@ RUN \ build-base \ cargo \ libffi-dev \ + libpq-dev \ libxml2-dev \ libxslt-dev \ python3-dev && \ @@ -26,6 +27,7 @@ RUN \ ffmpeg \ libxml2 \ libxslt \ + mediainfo \ python3 && \ echo "**** install unrar from source ****" && \ mkdir /tmp/unrar && \ @@ -39,6 +41,8 @@ RUN \ make && \ install -v -m755 unrar /usr/local/bin && \ echo "**** install bazarr ****" && \ + mkdir -p \ + /app/bazarr/bin && \ if [ -z ${BAZARR_VERSION+x} ]; then \ BAZARR_VERSION=$(curl -sX GET "https://api.github.com/repos/morpheus65535/bazarr/releases/latest" \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ @@ -46,20 +50,22 @@ RUN \ curl -o \ /tmp/bazarr.zip -L \ "https://github.com/morpheus65535/bazarr/releases/download/${BAZARR_VERSION}/bazarr.zip" && \ - mkdir -p \ - /app/bazarr/bin && \ unzip \ /tmp/bazarr.zip -d \ /app/bazarr/bin && \ rm -Rf /app/bazarr/bin/bin && \ echo "UpdateMethod=docker\nBranch=master\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/bazarr/package_info && \ + curl -o \ + /app/bazarr/bin/postgres-requirements.txt -L \ + "https://raw.githubusercontent.com/morpheus65535/bazarr/${BAZARR_VERSION}/postgres-requirements.txt" && \ echo "**** Install requirements ****" && \ python3 -m ensurepip && \ pip3 install -U --no-cache-dir \ pip \ wheel && \ - pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ -r \ - /app/bazarr/bin/requirements.txt && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \ + -r /app/bazarr/bin/requirements.txt \ + -r /app/bazarr/bin/postgres-requirements.txt && \ echo "**** clean up ****" && \ apk del --purge \ build-dependencies && \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 995b731..41fb6f1 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -18,6 +18,7 @@ RUN \ build-base \ cargo \ libffi-dev \ + libpq-dev \ libxml2-dev \ libxslt-dev \ python3-dev && \ @@ -26,6 +27,7 @@ RUN \ ffmpeg \ libxml2 \ libxslt \ + mediainfo \ python3 && \ echo "**** install unrar from source ****" && \ mkdir /tmp/unrar && \ @@ -39,6 +41,8 @@ RUN \ make && \ install -v -m755 unrar /usr/local/bin && \ echo "**** install bazarr ****" && \ + mkdir -p \ + /app/bazarr/bin && \ if [ -z ${BAZARR_VERSION+x} ]; then \ BAZARR_VERSION=$(curl -sX GET "https://api.github.com/repos/morpheus65535/bazarr/releases/latest" \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ @@ -46,20 +50,22 @@ RUN \ curl -o \ /tmp/bazarr.zip -L \ "https://github.com/morpheus65535/bazarr/releases/download/${BAZARR_VERSION}/bazarr.zip" && \ - mkdir -p \ - /app/bazarr/bin && \ unzip \ /tmp/bazarr.zip -d \ /app/bazarr/bin && \ rm -Rf /app/bazarr/bin/bin && \ echo "UpdateMethod=docker\nBranch=master\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/bazarr/package_info && \ + curl -o \ + /app/bazarr/bin/postgres-requirements.txt -L \ + "https://raw.githubusercontent.com/morpheus65535/bazarr/${BAZARR_VERSION}/postgres-requirements.txt" && \ echo "**** Install requirements ****" && \ python3 -m ensurepip && \ pip3 install -U --no-cache-dir \ pip \ wheel && \ - pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ -r \ - /app/bazarr/bin/requirements.txt && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \ + -r /app/bazarr/bin/requirements.txt \ + -r /app/bazarr/bin/postgres-requirements.txt && \ echo "**** clean up ****" && \ apk del --purge \ build-dependencies && \ diff --git a/README.md b/README.md index 8e7756f..3d63b57 100644 --- a/README.md +++ b/README.md @@ -237,6 +237,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **26.02.23:** - Add dependencies for postgres support. Add mediainfo. * **23.01.23:** - Rebase master branch to Alpine 3.17. * **11.10.22:** - Rebase master branch to Alpine 3.16, migrate to s6v3. * **15.15.21:** - Temp fix for lxml, compile from scratch to avoid broken official wheel. diff --git a/readme-vars.yml b/readme-vars.yml index 95b8509..f997ba9 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -45,6 +45,7 @@ app_setup_block: | # changelog changelogs: + - { date: "26.02.23:", desc: "Add dependencies for postgres support. Add mediainfo." } - { date: "23.01.23:", desc: "Rebase master branch to Alpine 3.17." } - { date: "11.10.22:", desc: "Rebase master branch to Alpine 3.16, migrate to s6v3." } - { date: "15.15.21:", desc: "Temp fix for lxml, compile from scratch to avoid broken official wheel." } diff --git a/root/etc/s6-overlay/s6-rc.d/init-bazarr-config/run b/root/etc/s6-overlay/s6-rc.d/init-bazarr-config/run index 3a13f42..ae4017a 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-bazarr-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-bazarr-config/run @@ -1,4 +1,5 @@ #!/usr/bin/with-contenv bash +# shellcheck shell=bash # permissions lsiown -R abc:abc \ diff --git a/root/etc/s6-overlay/s6-rc.d/svc-bazarr/run b/root/etc/s6-overlay/s6-rc.d/svc-bazarr/run index 56ca65d..8581337 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-bazarr/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-bazarr/run @@ -1,5 +1,6 @@ #!/usr/bin/with-contenv bash +# shellcheck shell=bash exec \ s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 6767" \ - s6-setuidgid abc python3 /app/bazarr/bin/bazarr.py --no-update --config /config + cd /app/bazarr/bin s6-setuidgid abc python3 /app/bazarr/bin/bazarr.py --no-update --config /config