Fix 404s: serve UI templates/static from configurable ui-root, not CWD
The web UI 404'd in production because templates/static were loaded
via relative paths ("internal/ui/templates", "internal/ui/static"),
which only resolved when running from the repo checkout. systemd sets
WorkingDirectory=/var/lib/wireguard-ui-multi, so those paths never
existed there.
Add a -ui-root flag (default /usr/local/share/wireguard-ui-multi/ui),
have install.sh copy internal/ui there, and resolve templates/static
paths through it instead of hardcoded relative strings.
Also add release-binary fast path to bootstrap.sh (falls back to
source build with CGO_ENABLED=0/-trimpath if no release exists yet),
and document real hardware/build-RAM requirements in the README.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
b2b6b82f58
commit
41894e67c6
@@ -43,6 +43,21 @@ systemd. Betrieb als natives Go-Binary.
|
||||
|
||||
## Installation
|
||||
|
||||
### Hardware-Anforderungen
|
||||
|
||||
Betrieb selbst ist sehr genügsam (kleines Go-Binary + SQLite, kein Docker/JVM):
|
||||
|
||||
- **Betrieb:** 1 vCPU, 128-256 MB RAM reichen locker
|
||||
- **Build aus Quellcode:** mind. **1 GB RAM** während `go build` — das
|
||||
`modernc.org/sqlite`-Package (reines Go, kein cgo, aber sehr großzügiger
|
||||
generierter Code) sprengt den `go`-Compiler bei 512 MB LXC-RAM
|
||||
(`signal: killed`, OOM-Killer). Bei 1 GB lief der Build durch.
|
||||
- Nach dem Build kann der Container/Server wieder auf 256-512 MB reduziert
|
||||
werden, falls Ressourcen knapp sind.
|
||||
- Alternative ohne Build-RAM-Bedarf: fertiges Release-Binary nutzen, sobald
|
||||
eine Release-Pipeline existiert (`bootstrap.sh` versucht das automatisch
|
||||
zuerst und fällt nur bei Fehlschlag auf den Source-Build zurück).
|
||||
|
||||
### Schnellinstallation (Einzeiler)
|
||||
|
||||
Auf einem frischen Debian/Ubuntu-Host (als root), lädt und installiert alles
|
||||
|
||||
Reference in New Issue
Block a user