From c5fc7fbd9d912dc03b09861c3864feca8726b6cc Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Sun, 6 Oct 2024 16:44:37 -0400 Subject: [PATCH] feat(sabnzbd): force logging to console Signed-off-by: Devin Buhl --- apps/sabnzbd/Dockerfile | 10 ++++------ apps/sabnzbd/README.md | 14 +++++++------- apps/sabnzbd/entrypoint.sh | 6 ++++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/sabnzbd/Dockerfile b/apps/sabnzbd/Dockerfile index 91c344b3..160843bb 100644 --- a/apps/sabnzbd/Dockerfile +++ b/apps/sabnzbd/Dockerfile @@ -13,10 +13,9 @@ ENV \ PIP_BREAK_SYSTEM_PACKAGES=1 \ CRYPTOGRAPHY_DONT_BUILD_RUST=1 -ENV SABNZBD__ADDRESS=0.0.0.0 -ENV SABNZBD__PORT=8080 - -ENV UMASK="0002" \ +ENV SABNZBD__ADDRESS=0.0.0.0 \ + SABNZBD__PORT=8080 \ + UMASK="0002" \ TZ="Etc/UTC" USER root @@ -74,7 +73,6 @@ USER nobody:nogroup WORKDIR /config VOLUME ["/config"] -ENTRYPOINT ["/usr/bin/catatonit", "--"] -CMD ["/entrypoint.sh"] +ENTRYPOINT ["/usr/bin/catatonit", "--", "/entrypoint.sh"] LABEL org.opencontainers.image.source="https://github.com/sabnzbd/sabnzbd" diff --git a/apps/sabnzbd/README.md b/apps/sabnzbd/README.md index 552f69b3..203e7616 100644 --- a/apps/sabnzbd/README.md +++ b/apps/sabnzbd/README.md @@ -4,10 +4,10 @@ This container support setting certain custom enviroment variables with the use of [drone/envsubst](https://github.com/drone/envsubst). -| Name | Default | -|---------------------------------|---------| -| SABNZBD__ADDRESS | | -| SABNZBD__PORT | | -| SABNZBD__API_KEY | | -| SABNZBD__NZB_KEY | | -| SABNZBD__HOST_WHITELIST_ENTRIES | | +| Name | Default | +|---------------------------------|-----------| +| SABNZBD__ADDRESS | `0.0.0.0` | +| SABNZBD__PORT | `8080` | +| SABNZBD__API_KEY | | +| SABNZBD__NZB_KEY | | +| SABNZBD__HOST_WHITELIST_ENTRIES | | diff --git a/apps/sabnzbd/entrypoint.sh b/apps/sabnzbd/entrypoint.sh index 4a2b6dcb..d103bfcc 100755 --- a/apps/sabnzbd/entrypoint.sh +++ b/apps/sabnzbd/entrypoint.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +#shellcheck disable=SC2086 if [[ ! -f "/config/sabnzbd.ini" ]]; then printf "Copying over default configuration ...\n" @@ -16,11 +17,12 @@ fi [[ -n "${SABNZBD__NZB_KEY}" ]] && sed -i -e "s/^nzb_key *=.*$/nzb_key = ${SABNZBD__NZB_KEY}/g" /config/sabnzbd.ini [[ -n "${SABNZBD__HOST_WHITELIST_ENTRIES}" ]] && sed -i -e "s/^host_whitelist *=.*$/host_whitelist = ${HOSTNAME:-sabnzbd}, ${SABNZBD__HOST_WHITELIST_ENTRIES}/g" /config/sabnzbd.ini -#shellcheck disable=SC2086 exec \ /usr/local/bin/python \ /app/SABnzbd.py \ --browser 0 \ - --server ${SABNZBD__ADDRESS:-0.0.0.0}:${SABNZBD__PORT:-8080} \ + --server ${SABNZBD__ADDRESS}:${SABNZBD__PORT} \ --config-file /config/sabnzbd.ini \ + --disable-file-log \ + --console \ "$@"