Artur Moreira
67f655820a
fix(wordpress): broaden proxy detection for WP_HOME inference (BIT-470)
...
- Treat X-Forwarded-Proto or X-Real-IP as sufficient proxy hints alongside X-Forwarded-For
- Normalize WORDPRESS_PUBLIC_URL in ensure-public-url script (trailing slash, any localhost:8080 substring)
- Update deployment.md and wordpress README
Made-with: Cursor
2026-03-24 19:47:35 +00:00
Artur Moreira
5e14e2df47
fix(deploy): auto-set WordPress public URL and sync wp_options on LXC
...
Add wordpress-ensure-public-url.sh (exit 2 when .env updated) and
wordpress-sync-options-url.sh to align siteurl/home with HTTPS. Wire
into deploy.sh and webhook-deploy.sh for /opt/news-platform only so
the board does not need manual .env or SQL for BIT-470/BIT-471.
Made-with: Cursor
2026-03-24 19:02:10 +00:00
Artur Moreira
7095765669
feat(deploy): LXC bootstrap, smoke script, /health in nginx, deployment doc (BIT-426)
...
- Add deploy/lxc/setup.sh for Ubuntu 24 CT (nginx, redis, docker, node 22, pm2)
- Add deploy/scripts/smoke-newsproject.sh for /, /health, wp-json checks
- Proxy GET /health to Fastify in newsproject.bitreport.pt nginx config
- Update docs/deployment.md: remove stub, NPM hostname, bootstrap order, canonical nginx path
Made-with: Cursor
2026-03-24 02:03:40 +00:00
Artur Moreira and Paperclip
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 Moreira and Paperclip
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 Moreira and Paperclip
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