Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e723e3ee5b |
No files matched your search
@@ -17,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: ['24.22.1']
|
||||
node-version: [24.22.1]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
24.22.1
|
||||
Generated
+11
-8
@@ -14,10 +14,13 @@
|
||||
"ioredis": "^5.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.14.0",
|
||||
"@types/node": "^24.19.2",
|
||||
"pino-pretty": "^13.1.3",
|
||||
"tsx": "^4.15.0",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=24.22.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
@@ -540,13 +543,13 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.19.37",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.37.tgz",
|
||||
"integrity": "sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw==",
|
||||
"version": "24.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz",
|
||||
"integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.21.0"
|
||||
"undici-types": ">=7.24.0 <7.24.7"
|
||||
}
|
||||
},
|
||||
"node_modules/abstract-logging": {
|
||||
@@ -1400,9 +1403,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
||||
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||
"version": "7.24.6",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz",
|
||||
"integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
||||
+4
-4
@@ -4,6 +4,9 @@
|
||||
"description": "WordPress REST API bridge for the news platform",
|
||||
"type": "module",
|
||||
"main": "dist/server.js",
|
||||
"engines": {
|
||||
"node": ">=24.22.1"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "tsx watch src/server.ts",
|
||||
"build": "tsc",
|
||||
@@ -19,12 +22,9 @@
|
||||
"ioredis": "^5.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.14.0",
|
||||
"@types/node": "^24.19.2",
|
||||
"pino-pretty": "^13.1.3",
|
||||
"tsx": "^4.15.0",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=24.22.1"
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -19,9 +19,10 @@ log "installing Docker..."
|
||||
apt-get install -y --no-install-recommends docker.io docker-compose-plugin
|
||||
systemctl enable --now docker
|
||||
|
||||
log "Node.js 22 (NodeSource)..."
|
||||
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
||||
log "Node.js 24 Active LTS (NodeSource)..."
|
||||
curl -fsSL https://deb.nodesource.com/setup_24.x | bash -
|
||||
apt-get install -y nodejs
|
||||
# Target runtime: Node.js 24.22.1 (Active LTS). Verify with: node -v
|
||||
|
||||
log "PM2 (global)..."
|
||||
npm install -g pm2
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ The bridge is a lightweight Fastify HTTP server that sits between the Astro fron
|
||||
| Layer | Choice |
|
||||
|-------|--------|
|
||||
| HTTP server | Fastify 5 |
|
||||
| Language | TypeScript (Node.js 22+) |
|
||||
| Language | TypeScript (Node.js 24.22.1+) |
|
||||
| Cache | Redis (ioredis) |
|
||||
| HTTP client | `undici` |
|
||||
| Process manager | PM2 or systemd |
|
||||
|
||||
+3
-3
@@ -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
|
||||
```
|
||||
|
||||
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 |
|
||||
|------|----------------|
|
||||
| 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`. |
|
||||
| Arranque | `depends_on: db` com `condition: service_healthy` |
|
||||
| Volumes | `db_data` (MySQL), `wp_content` (uploads/plugins) |
|
||||
@@ -218,7 +218,7 @@ pm2 startup
|
||||
## Deployment Checklist
|
||||
|
||||
- [ ] 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/`
|
||||
- [ ] `config/domains/newsproject.bitreport.pt.json` populated
|
||||
- [ ] Bridge dependencies installed and built
|
||||
|
||||
Generated
+9
-9
@@ -12,11 +12,11 @@
|
||||
"astro": "^6.0.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.19.39",
|
||||
"@types/node": "^24.19.2",
|
||||
"tsx": "^4.21.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
"node": ">=24.22.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@astrojs/compiler": {
|
||||
@@ -1583,13 +1583,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.19.39",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.39.tgz",
|
||||
"integrity": "sha512-orrrD74MBUyK8jOAD/r0+lfa1I2MO6I+vAkmAWzMYbCcgrN4lCrmK52gRFQq/JRxfYPfonkr4b0jcY7Olqdqbw==",
|
||||
"version": "24.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz",
|
||||
"integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.21.0"
|
||||
"undici-types": ">=7.24.0 <7.24.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/unist": {
|
||||
@@ -4491,9 +4491,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
||||
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||
"version": "7.24.6",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz",
|
||||
"integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==",
|
||||
"devOptional": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"astro": "^6.0.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.19.39",
|
||||
"@types/node": "^24.19.2",
|
||||
"tsx": "^4.21.0"
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -7,7 +7,7 @@ Headless WordPress instance serving the News Platform via the REST API. The WP f
|
||||
| Service | Port | Notes |
|
||||
|---------|------|-------|
|
||||
| `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 |
|
||||
| `wordpress-andebol` | (internal) | Second FPM stack |
|
||||
| MariaDB 11 | 3306 | Internal only — not exposed to host (`db`, `db-andebol`) |
|
||||
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
start_period: 90s
|
||||
|
||||
wordpress:
|
||||
image: wordpress:6-php8.4-fpm
|
||||
image: wordpress:6-php8.5-fpm
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
db:
|
||||
@@ -135,7 +135,7 @@ services:
|
||||
start_period: 90s
|
||||
|
||||
wordpress-andebol:
|
||||
image: wordpress:6-php8.4-fpm
|
||||
image: wordpress:6-php8.5-fpm
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
db-andebol:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
24.22.1
|
||||
Generated
+11
-8
@@ -13,9 +13,12 @@
|
||||
"rss-parser": "^3.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.14.0",
|
||||
"@types/node": "^24.19.2",
|
||||
"tsx": "^4.15.0",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=24.22.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
@@ -502,13 +505,13 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.19.37",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.37.tgz",
|
||||
"integrity": "sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw==",
|
||||
"version": "24.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz",
|
||||
"integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.21.0"
|
||||
"undici-types": ">=7.24.0 <7.24.7"
|
||||
}
|
||||
},
|
||||
"node_modules/abstract-logging": {
|
||||
@@ -1145,9 +1148,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
||||
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||
"version": "7.24.6",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz",
|
||||
"integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"description": "Aggregator-first writer pipeline for andebol.net (shortlist, token metrics, WP drafts)",
|
||||
"engines": {
|
||||
"node": ">=24.22.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"typecheck": "tsc --noEmit",
|
||||
@@ -22,11 +25,8 @@
|
||||
"rss-parser": "^3.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.14.0",
|
||||
"@types/node": "^24.19.2",
|
||||
"tsx": "^4.15.0",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=24.22.1"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user