cfcb1afcec
--metrics-port (0.0.0.0, в отличие от --health-port — тот 127.0.0.1-only) отдаёт netrunner_connections_active/total, netrunner_auth_validate_duration_seconds, netrunner_auth_failures_total, netrunner_circuit_breaker_open. Тот же hand-rolled HTTP-паттерн, что и health.rs — без HTTP-фреймворка ради одного эндпоинта. scripts/generate-prometheus-targets.mjs генерит список scrape-таргетов из nodes.json — job update-observability-targets в deploy.yml гоняет его при каждом деплое нод и заливает на VPS с данными (netrunner-data/observability/targets/nodes.json), чтобы центральный Prometheus не терял из виду ноды без ручной правки конфига. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
19 lines
627 B
Desktop File
19 lines
627 B
Desktop File
[Unit]
|
|
Description=Netrunner Remote Proxy
|
|
After=network.target
|
|
|
|
[Service]
|
|
User=root
|
|
WorkingDirectory=/root/netr-core
|
|
ExecStart=/root/netr-core/netrunner-server --host=0.0.0.0 --port=443 --health-port=9091 --metrics-port=9093
|
|
Restart=always
|
|
RestartSec=3
|
|
LimitNOFILE=65535
|
|
# systemctl stop/restart шлёт SIGTERM — теперь сервер ловит его сам и
|
|
# дожидается отключения активных клиентов (см. server/src/main.rs,
|
|
# server/src/network.rs) вместо мгновенного обрыва по TimeoutStopSec.
|
|
TimeoutStopSec=35
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|