fix: add APP_VERSION fallback and HOST bind address env var (#952 #953) (#955)

* fix: add APP_VERSION fallback and HOST bind env var (#952 #953)

- Read package.json version when APP_VERSION env var is absent so the
  startup banner shows the correct version for source/Proxmox installs
- Add HOST env var to control the HTTP bind address; only applied when
  set so Docker deployments are unaffected (bind-all-interfaces default)
- Parse PORT as Number() so malformed values like '10.0.0.72:3001' fall
  back to 3001 instead of silently misbehaving
- Document HOST in .env.example, Environment-Variables wiki, and
  Install-Proxmox wiki with explicit warnings against using it in Docker

* fix: correct package.json path in APP_VERSION fallback

index.ts sits at server/src/ — one level up reaches server/package.json,
not two (../../ overshot to the repo root where no package.json exists).
This commit is contained in:
Julien G.
2026-05-04 14:21:55 +02:00
committed by GitHub
parent 256f38d8fa
commit 22f3bf4bfc
5 changed files with 48 additions and 4 deletions
+11
View File
@@ -78,6 +78,17 @@ The environment file is located at `/opt/trek/server/.env` inside the container.
systemctl restart trek
```
### Binding to a specific network interface
If your Proxmox host has multiple network interfaces and you want TREK to listen on only one of them, set the `HOST` variable in `/opt/trek/server/.env`:
```
HOST=10.0.0.72 # bind only on this LAN interface
PORT=3001
```
> **Note:** `HOST` is only relevant for source-based and Proxmox installs. Do not use it in Docker or any containerised deployment.
See [Environment-Variables](Environment-Variables) for the full variable reference.
## Updating