Root cause: DOMAINS_CONFIG_PATH was missing from the frontend env so
getDomainConfig('andebol.net') fell through to the English fallback.
Fixes applied:
- deploy/systemd/frontend.env.example: add DOMAINS_CONFIG_PATH and
BRIDGE_INTERNAL_URL so Astro SSR resolves domain JSON on the CT
- bridge/src/lib/request-host.ts: drop X-Site-Host; resolve site domain
from the HTTP Host header which nginx already preserves ($host)
- frontend/src/lib/bridge.ts: multi-domain SWR cache keys; nginx-routed
bridge calls via public hostname with BRIDGE_INTERNAL_URL loopback
override for CT environments where public DNS does not resolve locally
- config/writers/f0251a61: restrict Nelson Alves topics to Andebol only
(remove Futebol / Desportos — BIT-22288 intent)
- frontend: overhauled article page (hero image, masthead, sidebar,
share bar), rich related-articles grid, improved LatestGrid institutional
theme, FpaAgendaSection rewrite, ui-i18n PT strings completed
Add html_listing ingest for Record and A Bola andebol sections and
revista_imprensa PDF index parsing from FPA media. Document AGGREGATOR_URL
in bridge.env.example and AGGREGATOR_OPERATIONS.md.
Paperclip-Issue: BIT-25559
Paperclip-Run: 0ab092e1-68ab-4e5a-90bd-4262e9c3d9fc
Wire run-cycle ingest and publish errors to errors.bitreport.pt using the
same reporter as bridge; document ERROR_REPORTING_* in writer env examples.
Paperclip-Agent: Artur Moreira (id ac1be104-8818-496a-80c5-fbc590a87855)
Paperclip-Issue: BIT-25125
Paperclip-Run: 06e3abea-e97b-481b-a1d5-70b286cf8983
Co-authored-by: Cursor <[email protected]>
When RSS/HTML provide no image, optional WRITER_WEBDAV_* env enables PROPFIND
depth-1 listing, headline-based file pick, Basic-auth GET, and WP caption from
Credit___filename pattern or WRITER_WEBDAV_DEFAULT_CREDIT (BIT-22292).
Co-authored-by: Cursor <[email protected]>
Daily oneshot cycle at 06:00 UTC via news-writer-andebol.timer;
env template covers ANDEBOL_WP_* credentials; deployment.md updated
with install steps, log tailing, and manual test run instructions.
Paperclip-Issue: BIT-2079
resolveSsrBridge now treats non-2xx /health as failure in production.
news-bridge no longer waits for news-frontend; frontend Wants+After
bridge so the API is up when Astro starts. Document the PT 503 string
and recovery commands in the BIT-746 runbook.
Extend healthcheck.sh with optional BRIDGE_DEEP_URL and PUBLIC_PAGE_URL
(customer-facing HTTPS with redirects). Document must-not-fail checks,
intervals, and escalation in docs/monitoring.md and a dedicated runbook.
Paperclip-Issue: BIT-746
Paperclip-Run: 04281f51-59ac-4267-a269-f12269dc2320
Paperclip-Agent: Tiago Neves (urlKey tiago-neves; id 5d084b36-f38f-42a5-a92a-520005afda4f)
Made-with: Cursor
Automated health monitoring for the news-platform services on CT222,
motivated by the bridge crash-loop incident (BIT-743) where 3,608
restarts went undetected until manual discovery.
Health endpoints:
- Bridge /health enhanced with optional ?checks=true for deep
dependency probes (WordPress, Redis) and uptime reporting
- Frontend /health.json added as Astro API route
Monitoring infrastructure:
- healthcheck.sh: periodic probe script with HTTP checks, systemd
restart-count detection, cooldown logic, and Ntfy push alerting
- news-healthcheck.timer: runs every 3 min (detection < 5 min)
- [email protected]: OnFailure template for instant crash alerts
- All three service units updated with OnFailure= directive
- deploy.sh updated to install monitoring units and env file
Paperclip-Agent: peter-spark
Paperclip-Issue: BIT-744
Paperclip-Run: 405ab587-8b8b-4963-8867-0feb95a994e3
- Forward X-Site-Host from Astro to the bridge so loopback calls use the public domain JSON
- Normalize newsproject.bitreport.pt.json (categories slug/label, wp on 127.0.0.1:8080)
- Degrade homepage/trending when WordPress is down instead of 500
- Extend webhook-deploy.sh for config/ and wordpress/ changes; add deploy-hook-server + systemd unit
- Document automatic Gitea webhook flow in docs/deployment.md; align DOMAINS_CONFIG_PATH env
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
Without this, pino-pretty (devDep) was required at runtime causing
the bridge service to crash on first boot.
Co-Authored-By: Paperclip <[email protected]>