mirror of
https://github.com/mileswolfallen2/miles-web.git
synced 2026-12-05 16:20:44 +00:00
fixed the server
This commit is contained in:
1 parent
559d3ef89c
commit
4175ad5be6
10 files changed
+446
-125
No files matched your search
+1
-1
@@ -147,7 +147,7 @@ Combined snapshot used by the dashboard.
|
||||
},
|
||||
"network": {
|
||||
"onHomeNetwork": true,
|
||||
"monitoredSubnet": "10.0.0.0/24"
|
||||
"monitoredSubnet": "192.168.50.0/24"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
|
||||
+6
-4
@@ -48,7 +48,8 @@ Check `ping` exists:
|
||||
|
||||
```bash
|
||||
command -v ping
|
||||
ping -c 1 10.0.0.87
|
||||
ping -c 1 192.168.50.102
|
||||
ping -c 1 192.168.50.103
|
||||
```
|
||||
|
||||
### Node.js 20 or newer
|
||||
@@ -382,7 +383,7 @@ lines before the catch-all and route DNS for them:
|
||||
|
||||
Do not expose port 8787 in the firewall. In the split-origin layout, the main
|
||||
static host must publish the updated `site-config.js`, `dashboard.js`,
|
||||
`dashboard.html`, `analytics.js`, and `moon-vault.html` from this repository.
|
||||
`dashboard.html`, `dashboard.css`, `analytics.js`, and `moon-vault.html` from this repository.
|
||||
|
||||
## 9. Persistence, backups, and restore
|
||||
|
||||
@@ -528,7 +529,8 @@ The monitor could not run `ping`. Check:
|
||||
|
||||
```bash
|
||||
command -v ping
|
||||
ping -c 1 10.0.0.87
|
||||
ping -c 1 192.168.50.102
|
||||
ping -c 1 192.168.50.103
|
||||
getcap "$(command -v ping)" 2>/dev/null || true
|
||||
sysctl net.ipv4.ping_group_range
|
||||
```
|
||||
@@ -547,7 +549,7 @@ Never make the Node process run as root just to ping two hosts.
|
||||
### Servers show `unknown` with `not_on_home_network`
|
||||
|
||||
The host's local addresses do not match `HOME_SUBNET`. Set it to the real
|
||||
subnet (for example `HOME_SUBNET=10.0.0.0/24`) and restart. This is intentional:
|
||||
subnet (for example `HOME_SUBNET=192.168.50.0/24`) and restart. This is intentional:
|
||||
a failed ping from a remote network is not reported as a home-server outage.
|
||||
|
||||
### Website checks all fail
|
||||
|
||||
+6
-6
@@ -97,7 +97,7 @@ Generate a hash with `npm run hash-password`; generate the secret with
|
||||
|
||||
| Setting | Default | Range / format | What it does | Change |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `HOME_SUBNET` | empty | CIDR, e.g. `10.0.0.0/24` | Subnet used to decide "on home network". When off-network, failed pings report `unknown` instead of `offline` | `.env`, restart |
|
||||
| `HOME_SUBNET` | empty | CIDR, e.g. `192.168.50.0/24` | Subnet used to decide "on home network". When off-network, failed pings report `unknown` instead of `offline` | `.env`, restart |
|
||||
| `SERVER_CHECK_INTERVAL_MS` | `60000` | 10000–86400000 | Ping loop interval | `.env`, restart |
|
||||
| `SERVICE_CHECK_INTERVAL_MS` | `120000` | 15000–86400000 | Website check loop interval | `.env`, restart |
|
||||
| `PING_TIMEOUT_MS` | `2000` | 200–30000 | Ping timeout | `.env`, restart |
|
||||
@@ -120,10 +120,10 @@ Environment overrides use the **1-based position in the file**:
|
||||
|
||||
```dotenv
|
||||
SERVER_1_NAME=Main Server
|
||||
SERVER_1_IP=10.0.0.87
|
||||
SERVER_1_IP=192.168.50.102
|
||||
SERVER_1_ENABLED=true
|
||||
SERVER_2_NAME=FEDL Server
|
||||
SERVER_2_IP=10.0.0.119
|
||||
SERVER_2_NAME=Debian Server
|
||||
SERVER_2_IP=192.168.50.103
|
||||
SERVER_2_ENABLED=true
|
||||
```
|
||||
|
||||
@@ -225,8 +225,8 @@ These run on the visitor's machine and are independent of `.env`.
|
||||
| Dashboard refresh | `dashboard.js` (`REFRESH_SECONDS`) | `60` | Auto-refresh interval in seconds | Code edit + deploy |
|
||||
| Analytics loader | `projects/script.js` | `/analytics.js` | Injects the beacon on every page | Code edit + deploy |
|
||||
|
||||
The static host must publish `site-config.js`, `dashboard.html`, `dashboard.js`,
|
||||
`analytics.js`, and `moon-vault.html` whenever they change. Purge Cloudflare or
|
||||
The static host must publish `site-config.js`, `dashboard.html`, `dashboard.css`,
|
||||
`dashboard.js`, `analytics.js`, and `moon-vault.html` whenever they change. Purge Cloudflare or
|
||||
hard-refresh, because static responses are cached for 4 hours.
|
||||
|
||||
---
|
||||
|
||||
Reference in new issue
Block a user