🐛 Fix container init so nginx starts reliably 🐛

Four bugs prevented nginx from starting in the super-productivity container.
All four are fixed; tested end-to-end: HTTP 200 on /, /health returns
"healthy", and sync-config-default-override.json is written correctly
from SUPERSYNC_BASE_URL env vars.
- Dockerfile: remove /etc/postfix and /etc/ssmtp in the pkmgr RUN step
so ssmtp binary cannot resolve config dirs that were never installed
- rootfs/usr/local/bin/entrypoint.sh: make __setup_mta non-fatal with
|| true; image has ssmtp binary but no config dirs — MTA is optional
- rootfs/usr/local/etc/docker/functions/entrypoint.sh: fix __setup_mta
guard (bare return → return 0) so it does not exit caller with code 1;
gate all verbose debug echoes behind DEBUGGER=on so they do not slow
down __fix_permissions / __setup_directories with unnecessary tee pipes
- rootfs/usr/local/etc/docker/init.d/zz-nginx.sh: guard EXEC_PRE_SCRIPT
type-P lookup behind [ -n ] so type -P '' cannot fire __trap_err_handler;
create nginx.local.sh with touch inside __create_service_env and remove
its __file_exists_with_content check from exitCode so the function
returns 0 and zz-nginx.sh proceeds to __run_start_script

Dockerfile
rootfs/usr/local/bin/entrypoint.sh
rootfs/usr/local/etc/docker/functions/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
This commit is contained in:
casjay
2026-06-26 15:00:27 -04:00
parent 57bdeb5ff8
commit 2684bd5dfa
4 changed files with 44 additions and 37 deletions
+2 -1
View File
@@ -46,7 +46,8 @@ ENV ENV="~/.profile" \
COPY ./rootfs/. /
RUN pkmgr update && pkmgr install bash ca-certificates nginx jq curl && update-ca-certificates
RUN pkmgr update && pkmgr install bash ca-certificates nginx jq curl && update-ca-certificates && \
rm -rf /etc/postfix /etc/ssmtp
ENV SHELL="/bin/bash"
SHELL ["/bin/bash", "-c"]