feat: Umami/ntfy 可观测性栈与 WordPress AdSense 部署

This commit is contained in:
eric
2026-08-15 23:49:19 -05:00
parent ba0b1058b0
commit 08f484780d
61 changed files with 2723 additions and 3 deletions

32
deploy/router/README.md Normal file
View File

@@ -0,0 +1,32 @@
# Audience router
`nomadro.com` is split by audience:
| Audience | Destination |
| --- | --- |
| Chinese users (`nomadro_route=zh`, via language/timezone sniff) | Next.js `:4003` |
| English users / default | WordPress `:8088` |
| Googlebot / AdsBot / other crawlers | WordPress (AdSense English surface) |
First HTML visit without a cookie gets a same-origin sniff page that sets `nomadro_route` and reloads.
Detection matches `is-china-user` language + timezone signals (any Chinese language in `navigator.languages` counts).
Router listens on `127.0.0.1:4403`.
## Deploy
```bash
python deploy/router/deploy_router.py
```
Or on server:
```bash
cd /var/www/nomadro-router
npm install --omit=dev
cp nomadro-router.service /etc/systemd/system/
systemctl enable --now nomadro-router
cp /path/to/Caddyfile /etc/caddy/Caddyfile
systemctl reload caddy
```