fix: replace startup sleep with readiness check, clean up stale env/config

- start.example.sh: replace fixed sleep 30 with /status poll loop (up to 2min)
  so the webmention poller waits exactly until indiekit is ready, not longer
- indiekit.config.mjs: remove redundant webmentionIoMountPath variable and
  mountPath from webmention-io config (package default /webmentions is correct)
- .env.example: remove all stale proxy and unused WEBMENTION_SENDER_* vars
  (HOST, PORT, ENDPOINT, READY_TIMEOUT, STOP_TIMEOUT, AUTO_POLL) that were
  never read by start.example.sh; keep only WEBMENTION_SENDER_POLL_INTERVAL

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
svemagie
2026-03-11 20:30:55 +01:00
parent c251650371
commit 6a2c38d798
3 changed files with 11 additions and 45 deletions

View File

@@ -67,7 +67,14 @@ WEBMENTION_ORIGIN="${PUBLICATION_URL:-${SITE_URL:-}}"
(
echo "[webmention] Starting auto-send polling every ${WEBMENTION_POLL_INTERVAL}s (${WEBMENTION_ENDPOINT})"
sleep 30 # Wait for indiekit to fully initialize before first poll
# Wait for indiekit to be ready before first poll (up to 2 minutes)
_i=0
until curl -sf "http://127.0.0.1:${PORT:-3000}/status" -o /dev/null 2>&1; do
_i=$((_i + 1))
[ $_i -lt 60 ] || { echo "[webmention] Warning: indiekit not ready after 120s, proceeding anyway"; break; }
sleep 2
done
echo "[webmention] Indiekit ready"
while true; do
TOKEN="$(
WEBMENTION_ORIGIN="$WEBMENTION_ORIGIN" WEBMENTION_SECRET="$SECRET" \