Merge pull request 'chore(runtime): WordPress PHP 8.5 + Node.js 24.22.1 baseline (BIT-31729)' (#56) from chore/BIT-31729-runtime-php84-node24 into main
Tests / writer-pipeline tests (push) Successful in 33s
Tests / bridge tests (push) Successful in 34s
Tests / frontend lib tests (push) Successful in 30s

This commit was merged in pull request #56.
This commit is contained in:
spark committed 2026-10-23 19:01:55 +01:00
commit ccb6552746
17 files changed
+59 -43

No files matched your search

+3 -3
View File
@@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: "22" node-version: "24.22.1"
cache: "npm" cache: "npm"
cache-dependency-path: writer-pipeline/package-lock.json cache-dependency-path: writer-pipeline/package-lock.json
- run: npm ci - run: npm ci
@@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: "22" node-version: "24.22.1"
cache: "npm" cache: "npm"
cache-dependency-path: bridge/package-lock.json cache-dependency-path: bridge/package-lock.json
- run: npm ci - run: npm ci
@@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: "22" node-version: "24.22.1"
cache: "npm" cache: "npm"
cache-dependency-path: frontend/package-lock.json cache-dependency-path: frontend/package-lock.json
- run: npm install - run: npm install
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
node-version: [18, 20] node-version: [24.22.1]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
+1
View File
@@ -0,0 +1 @@
24.22.1
+1
View File
@@ -0,0 +1 @@
24.22.1
+11 -8
View File
@@ -14,10 +14,13 @@
"ioredis": "^5.4.1" "ioredis": "^5.4.1"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.14.0", "@types/node": "^24.19.2",
"pino-pretty": "^13.1.3", "pino-pretty": "^13.1.3",
"tsx": "^4.15.0", "tsx": "^4.15.0",
"typescript": "^5.4.5" "typescript": "^5.4.5"
},
"engines": {
"node": ">=24.22.1"
} }
}, },
"node_modules/@esbuild/aix-ppc64": { "node_modules/@esbuild/aix-ppc64": {
@@ -540,13 +543,13 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.19.37", "version": "24.19.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.37.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz",
"integrity": "sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw==", "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~6.21.0" "undici-types": ">=7.24.0 <7.24.7"
} }
}, },
"node_modules/abstract-logging": { "node_modules/abstract-logging": {
@@ -1400,9 +1403,9 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "6.21.0", "version": "7.24.6",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
+4 -1
View File
@@ -4,6 +4,9 @@
"description": "WordPress REST API bridge for the news platform", "description": "WordPress REST API bridge for the news platform",
"type": "module", "type": "module",
"main": "dist/server.js", "main": "dist/server.js",
"engines": {
"node": ">=24.22.1"
},
"scripts": { "scripts": {
"dev": "tsx watch src/server.ts", "dev": "tsx watch src/server.ts",
"build": "tsc", "build": "tsc",
@@ -19,7 +22,7 @@
"ioredis": "^5.4.1" "ioredis": "^5.4.1"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.14.0", "@types/node": "^24.19.2",
"pino-pretty": "^13.1.3", "pino-pretty": "^13.1.3",
"tsx": "^4.15.0", "tsx": "^4.15.0",
"typescript": "^5.4.5" "typescript": "^5.4.5"
+3 -2
View File
@@ -19,9 +19,10 @@ log "installing Docker..."
apt-get install -y --no-install-recommends docker.io docker-compose-plugin apt-get install -y --no-install-recommends docker.io docker-compose-plugin
systemctl enable --now docker systemctl enable --now docker
log "Node.js 22 (NodeSource)..." log "Node.js 24 Active LTS (NodeSource)..."
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - curl -fsSL https://deb.nodesource.com/setup_24.x | bash -
apt-get install -y nodejs apt-get install -y nodejs
# Target runtime: Node.js 24.22.1 (Active LTS). Verify with: node -v
log "PM2 (global)..." log "PM2 (global)..."
npm install -g pm2 npm install -g pm2
+1 -1
View File
@@ -25,7 +25,7 @@ The bridge is a lightweight Fastify HTTP server that sits between the Astro fron
| Layer | Choice | | Layer | Choice |
|-------|--------| |-------|--------|
| HTTP server | Fastify 5 | | HTTP server | Fastify 5 |
| Language | TypeScript (Node.js 22+) | | Language | TypeScript (Node.js 24.22.1+) |
| Cache | Redis (ioredis) | | Cache | Redis (ioredis) |
| HTTP client | `undici` | | HTTP client | `undici` |
| Process manager | PM2 or systemd | | Process manager | PM2 or systemd |
+3 -3
View File
@@ -73,7 +73,7 @@ Versioned script on the repo (run as **root** on a fresh Ubuntu 24.04 CT):
sudo bash /opt/news-platform/deploy/lxc/setup.sh sudo bash /opt/news-platform/deploy/lxc/setup.sh
``` ```
It installs nginx, Redis, Docker (+ compose plugin), Node.js 22, and PM2, and enables `docker` and `redis-server`. It installs nginx, Redis, Docker (+ compose plugin), Node.js 24 (Active LTS), and PM2, and enables `docker` and `redis-server`.
--- ---
@@ -184,7 +184,7 @@ A stack real está versionada em **`wordpress/docker-compose.yml`** (não duplic
| Item | Valor actual | | Item | Valor actual |
|------|----------------| |------|----------------|
| Database | **MariaDB 11** (`mariadb:11`), serviço `db`, porta 3306 só na rede Compose | | Database | **MariaDB 11** (`mariadb:11`), serviço `db`, porta 3306 só na rede Compose |
| WordPress | `wordpress:6-php8.3-fpm` + `nginx:alpine` sidecar per site; `WORDPRESS_DB_HOST: db:3306` (andebol: `db-andebol`) | | WordPress | `wordpress:6-php8.5-fpm` + `nginx:alpine` sidecar per site; `WORDPRESS_DB_HOST: db:3306` (andebol: `db-andebol`) |
| URL pública | Preferir `WORDPRESS_PUBLIC_URL=https://newsproject.bitreport.pt` no `wordpress/.env`. Se faltar, o `wp-config` infere `https://` + `Host` quando o pedido chega **via Nginx do CT** e traz qualquer *hint* de proxy (`X-Forwarded-Proto`, `X-Forwarded-For`, ou `X-Real-IP`); `X-Forwarded-Proto` deve reflectir o HTTPS do NPM — ver `deploy/nginx/newsproject.bitreport.pt.conf`. | | URL pública | Preferir `WORDPRESS_PUBLIC_URL=https://newsproject.bitreport.pt` no `wordpress/.env`. Se faltar, o `wp-config` infere `https://` + `Host` quando o pedido chega **via Nginx do CT** e traz qualquer *hint* de proxy (`X-Forwarded-Proto`, `X-Forwarded-For`, ou `X-Real-IP`); `X-Forwarded-Proto` deve reflectir o HTTPS do NPM — ver `deploy/nginx/newsproject.bitreport.pt.conf`. |
| Arranque | `depends_on: db` com `condition: service_healthy` | | Arranque | `depends_on: db` com `condition: service_healthy` |
| Volumes | `db_data` (MySQL), `wp_content` (uploads/plugins) | | Volumes | `db_data` (MySQL), `wp_content` (uploads/plugins) |
@@ -218,7 +218,7 @@ pm2 startup
## Deployment Checklist ## Deployment Checklist
- [ ] LXC container created and running - [ ] LXC container created and running
- [ ] Base packages installed (Node 22, nginx, redis, docker) - [ ] Base packages installed (Node 24.22.1, nginx, redis, docker)
- [ ] Git repo cloned to `/opt/news-platform/` - [ ] Git repo cloned to `/opt/news-platform/`
- [ ] `config/domains/newsproject.bitreport.pt.json` populated - [ ] `config/domains/newsproject.bitreport.pt.json` populated
- [ ] Bridge dependencies installed and built - [ ] Bridge dependencies installed and built
+1 -1
View File
@@ -1 +1 @@
22 24.22.1
+9 -9
View File
@@ -12,11 +12,11 @@
"astro": "^6.0.8" "astro": "^6.0.8"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.19.39", "@types/node": "^24.19.2",
"tsx": "^4.21.0" "tsx": "^4.21.0"
}, },
"engines": { "engines": {
"node": ">=22.12.0" "node": ">=24.22.1"
} }
}, },
"node_modules/@astrojs/compiler": { "node_modules/@astrojs/compiler": {
@@ -1583,13 +1583,13 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.19.39", "version": "24.19.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.39.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz",
"integrity": "sha512-orrrD74MBUyK8jOAD/r0+lfa1I2MO6I+vAkmAWzMYbCcgrN4lCrmK52gRFQq/JRxfYPfonkr4b0jcY7Olqdqbw==", "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==",
"devOptional": true, "devOptional": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~6.21.0" "undici-types": ">=7.24.0 <7.24.7"
} }
}, },
"node_modules/@types/unist": { "node_modules/@types/unist": {
@@ -4491,9 +4491,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "6.21.0", "version": "7.24.6",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==",
"devOptional": true, "devOptional": true,
"license": "MIT" "license": "MIT"
}, },
+2 -2
View File
@@ -4,7 +4,7 @@
"version": "0.1.0", "version": "0.1.0",
"description": "Astro SSR frontend for multi-domain sports news platform", "description": "Astro SSR frontend for multi-domain sports news platform",
"engines": { "engines": {
"node": ">=22.12.0" "node": ">=24.22.1"
}, },
"scripts": { "scripts": {
"dev": "astro dev", "dev": "astro dev",
@@ -19,7 +19,7 @@
"astro": "^6.0.8" "astro": "^6.0.8"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.19.39", "@types/node": "^24.19.2",
"tsx": "^4.21.0" "tsx": "^4.21.0"
} }
} }
+1 -1
View File
@@ -7,7 +7,7 @@ Headless WordPress instance serving the News Platform via the REST API. The WP f
| Service | Port | Notes | | Service | Port | Notes |
|---------|------|-------| |---------|------|-------|
| `nginx` | **8080** → 80 | Public HTTP edge; proxies to PHP-FPM | | `nginx` | **8080** → 80 | Public HTTP edge; proxies to PHP-FPM |
| `wordpress` | (internal) | `wordpress:6-php8.3-fpm` — PHP-FPM only | | `wordpress` | (internal) | `wordpress:6-php8.5-fpm` — PHP-FPM only |
| `nginx-andebol` | **8081** → 80 | Andebol WordPress edge | | `nginx-andebol` | **8081** → 80 | Andebol WordPress edge |
| `wordpress-andebol` | (internal) | Second FPM stack | | `wordpress-andebol` | (internal) | Second FPM stack |
| MariaDB 11 | 3306 | Internal only — not exposed to host (`db`, `db-andebol`) | | MariaDB 11 | 3306 | Internal only — not exposed to host (`db`, `db-andebol`) |
+2 -2
View File
@@ -17,7 +17,7 @@ services:
start_period: 90s start_period: 90s
wordpress: wordpress:
image: wordpress:6-php8.3-fpm image: wordpress:6-php8.5-fpm
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
db: db:
@@ -135,7 +135,7 @@ services:
start_period: 90s start_period: 90s
wordpress-andebol: wordpress-andebol:
image: wordpress:6-php8.3-fpm image: wordpress:6-php8.5-fpm
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
db-andebol: db-andebol:
+1
View File
@@ -0,0 +1 @@
24.22.1
+11 -8
View File
@@ -13,9 +13,12 @@
"rss-parser": "^3.13.0" "rss-parser": "^3.13.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.14.0", "@types/node": "^24.19.2",
"tsx": "^4.15.0", "tsx": "^4.15.0",
"typescript": "^5.4.5" "typescript": "^5.4.5"
},
"engines": {
"node": ">=24.22.1"
} }
}, },
"node_modules/@esbuild/aix-ppc64": { "node_modules/@esbuild/aix-ppc64": {
@@ -502,13 +505,13 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.19.37", "version": "24.19.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.37.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz",
"integrity": "sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw==", "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~6.21.0" "undici-types": ">=7.24.0 <7.24.7"
} }
}, },
"node_modules/abstract-logging": { "node_modules/abstract-logging": {
@@ -1145,9 +1148,9 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "6.21.0", "version": "7.24.6",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
+4 -1
View File
@@ -4,6 +4,9 @@
"private": true, "private": true,
"type": "module", "type": "module",
"description": "Aggregator-first writer pipeline for andebol.net (shortlist, token metrics, WP drafts)", "description": "Aggregator-first writer pipeline for andebol.net (shortlist, token metrics, WP drafts)",
"engines": {
"node": ">=24.22.1"
},
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
@@ -22,7 +25,7 @@
"rss-parser": "^3.13.0" "rss-parser": "^3.13.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.14.0", "@types/node": "^24.19.2",
"tsx": "^4.15.0", "tsx": "^4.15.0",
"typescript": "^5.4.5" "typescript": "^5.4.5"
} }