mirror of
https://github.com/casjaysdevdocker/super-productivity
synced 2026-09-05 01:00:25 -04:00
🐛 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:
@@ -578,13 +578,11 @@ EOF
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__update_ssl_conf_local() { true; }
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
touch "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.local.sh" 2>/dev/null || true
|
||||
fi
|
||||
if ! __file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh"; then
|
||||
exitCode=$((exitCode + 1))
|
||||
fi
|
||||
if ! __file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.local.sh"; then
|
||||
exitCode=$((exitCode + 1))
|
||||
fi
|
||||
return $exitCode
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
@@ -792,8 +790,7 @@ EXEC_CMD_NAME="${EXEC_CMD_BIN##*/}"
|
||||
SERVICE_PID_FILE="/run/init.d/$EXEC_CMD_NAME.pid"
|
||||
_resolved="$(type -P "$EXEC_CMD_BIN" 2>/dev/null)"
|
||||
[ -n "$_resolved" ] && EXEC_CMD_BIN="$_resolved"
|
||||
_resolved="$(type -P "$EXEC_PRE_SCRIPT" 2>/dev/null)"
|
||||
[ -n "$_resolved" ] && EXEC_PRE_SCRIPT="$_resolved"
|
||||
[ -n "$EXEC_PRE_SCRIPT" ] && { _resolved="$(type -P "$EXEC_PRE_SCRIPT" 2>/dev/null)"; [ -n "$_resolved" ] && EXEC_PRE_SCRIPT="$_resolved"; }
|
||||
unset _resolved
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Only run check when explicitly requested
|
||||
|
||||
Reference in New Issue
Block a user