Cleanup repo, add Gitea CI/CD workflow, improve error handling
All checks were successful
Deploy GSM / deploy (push) Successful in 1m25s
All checks were successful
Deploy GSM / deploy (push) Successful in 1m25s
- Remove temp files and reorganize docs - Add .gitea/workflows/deploy.yml for automated deployment - Add unreachable host checks to server routes (/:id, logs, start/stop/restart) - Add unreachable checks to config routes (zomboid, terraria, openttd) - Return HTTP 503 with unreachable flag instead of crashing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -64,7 +64,9 @@ Steam App IDs:
|
||||
- V Rising: `1829350`
|
||||
- Factorio: `427520` (oder manuell von factorio.com)
|
||||
|
||||
## Schritt 2: Systemd Service erstellen
|
||||
## Schritt 2: Service erstellen (systemd oder PM2)
|
||||
|
||||
### Option A: Systemd Service (empfohlen für root-Zugang)
|
||||
|
||||
Erstelle `/etc/systemd/system/<spielname>.service`:
|
||||
|
||||
@@ -92,6 +94,34 @@ systemctl daemon-reload
|
||||
systemctl enable <spielname>
|
||||
```
|
||||
|
||||
### Option B: PM2 (für User ohne root-Zugang)
|
||||
|
||||
PM2 eignet sich für Server, wo kein Root-Zugang verfügbar ist (z.B. externe VMs).
|
||||
|
||||
```bash
|
||||
# NVM installieren
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
|
||||
source ~/.nvm/nvm.sh
|
||||
|
||||
# Node.js und PM2 installieren
|
||||
nvm install --lts
|
||||
npm install -g pm2
|
||||
|
||||
# Server starten (Beispiel Terraria)
|
||||
cd /home/<user>/<spielordner>
|
||||
pm2 start ./StartServer.sh --name <spielname>
|
||||
|
||||
# Speichern für Autostart
|
||||
pm2 save
|
||||
```
|
||||
|
||||
Für Autostart nach Reboot muss ein Admin den folgenden Befehl mit sudo ausführen:
|
||||
```bash
|
||||
sudo env PATH=$PATH:/home/<user>/.nvm/versions/node/<version>/bin pm2 startup systemd -u <user> --hp /home/<user>
|
||||
```
|
||||
|
||||
In der GSM config.json `"runtime": "pm2"` und `"serviceName": "<pm2-prozessname>"` setzen.
|
||||
|
||||
## Schritt 3: Node Exporter installieren
|
||||
|
||||
Für Metriken im GSM Dashboard:
|
||||
@@ -352,3 +382,4 @@ CREATE TABLE server_display_settings (
|
||||
| V Rising | 192.168.2.52 | LXC | 9876-9877/UDP |
|
||||
| Palworld | 192.168.2.53 | LXC | 8211/UDP, 27015/UDP |
|
||||
| Project Zomboid | 10.0.30.66 | VM (extern) | 16261-16262/UDP |
|
||||
| Terraria | 10.0.30.202 | VM (extern/VPN) | 7777/TCP |
|
||||
|
||||
Reference in New Issue
Block a user