Commit Graph
3 Commits
Author SHA1 Message Date
Artur MoreiraandPaperclip a8b71762d9 fix(news-platform): SSR domain routing, resilient homepage, Gitea deploy hook
- 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
2026-03-23 19:47:19 +00:00
Artur MoreiraandPaperclip 0e27dd8359 fix(deploy): use full npm ci in webhook-deploy to include devDeps for tsc build
npm ci --omit=dev excluded TypeScript (devDep) causing the build step to fail.
Build needs devDeps; runtime doesn't because it runs compiled dist/.

Co-Authored-By: Paperclip <[email protected]>
2026-03-23 19:38:30 +00:00
Artur MoreiraandPaperclip 0e3a1afb3b feat: deploy pipeline — systemd units, Nginx, deploy scripts (BIT-352)
deploy/systemd/:
  - news-frontend.service (Astro SSR :4321)
  - news-bridge.service (Fastify :3200)
  - news-wordpress.service (Docker Compose wrapper)
  - frontend.env.example + bridge.env.example

deploy/nginx/:
  - newsproject.bitreport.pt.conf (reverse proxy → :4321, /api/ → :3200)
  - Nginx config validated OK on CT 222

deploy/scripts/:
  - deploy.sh — full from-scratch deploy (clone, build, install, start)
  - webhook-deploy.sh — incremental deploy on git push (cron-friendly)

Tested on CT 222 (10.10.50.140):
  - nginx -t → OK
  - systemd units installed (news-frontend/bridge/wordpress)
  - news-wordpress enabled; frontend/bridge pending Astro build

Remaining manual steps:
  - DHCP reservation for 10.10.50.140
  - NPM proxy host: newsproject.bitreport.pt → http://10.10.50.140
  - Run deploy.sh after bridge.env and frontend.env are configured

Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
2026-03-23 15:48:43 +00:00