mirror of
https://github.com/db9979/tiefenkontakt.git
synced 2026-12-05 12:24:12 +01:00
- Escorts: bridge lookouts (periscope feather, snorkel, surfaced boats, torpedo tracks), spoken sighting reports, 3D bridge station with binoculars and own foredeck, lookout hit inset - 3D sea split into models/shaders: multi-wave ocean with whitecaps, clouds, sun and moon, detailed ships with smoke and turning radar - Radar room rebuilt as phosphor PPI with range scales, ESM rose and radar status; NATO symbols on plot, mission charts and replay - Sortable and filterable contact list, leaderboard and alert log; smoothed list bearings; clear convoy progress bar - Ops: backups, metrics, structured logs, CI, Elo ratings, private matches, corvette and coastal sub, network load test - Mail: configurable SMTP (Gmail/iCloud), signal-style HTML mails with inline sonar header, mail test command - Fixes: spoofable client IP behind proxy, phone layout and lost taps, stacked debriefs, station 5 rejected by server - Raspberry Pi deploy script and .env.example
31 lines
1.2 KiB
Bash
Executable File
31 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
||
# Deploy Tiefenkontakt to a Raspberry Pi (or any Linux host with Docker) over SSH.
|
||
# Usage: scripts/deploy-pi.sh [user@host] [remote dir]
|
||
# Needs SSH key login (ssh-copy-id user@host once). The remote .env is never overwritten.
|
||
set -euo pipefail
|
||
HOST="${1:-speech@speech.local}"
|
||
DIR="${2:-tiefenkontakt}"
|
||
cd "$(dirname "$0")/.."
|
||
|
||
echo "▸ Kopiere Code nach $HOST:~/$DIR"
|
||
ssh "$HOST" "mkdir -p ~/$DIR"
|
||
rsync -az --delete \
|
||
--exclude node_modules --exclude dist --exclude .git --exclude .matches --exclude '*.db' --exclude '*.db-journal' \
|
||
--exclude .env --exclude .claude --exclude .DS_Store \
|
||
./ "$HOST:~/$DIR/"
|
||
|
||
echo "▸ Baue und starte den Container (beim ersten Mal einige Minuten)"
|
||
ssh "$HOST" "cd ~/$DIR && ( [ -f .env ] || cp .env.example .env ) && docker compose up -d --build"
|
||
|
||
echo "▸ Warte auf den Server"
|
||
for i in $(seq 1 60); do
|
||
if ssh "$HOST" "curl -sf localhost:\$(grep -E '^HOST_PORT=' ~/$DIR/.env | cut -d= -f2 || echo 8787)/api/health >/dev/null 2>&1 || curl -sf localhost:8787/api/health >/dev/null"; then
|
||
echo "✓ Läuft auf $HOST"
|
||
exit 0
|
||
fi
|
||
sleep 3
|
||
done
|
||
echo "✗ Server antwortet nicht – Logs:"
|
||
ssh "$HOST" "cd ~/$DIR && docker compose logs --tail 40"
|
||
exit 1
|