Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sabnzbd): force logging to console #1112

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions apps/sabnzbd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
14 changes: 7 additions & 7 deletions apps/sabnzbd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | |
6 changes: 4 additions & 2 deletions apps/sabnzbd/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
#shellcheck disable=SC2086

if [[ ! -f "/config/sabnzbd.ini" ]]; then
printf "Copying over default configuration ...\n"
Expand All @@ -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 \
"$@"