Initial commit: EifelDC - Discord-like Matrix chat platform
Some checks failed
CI / Rust Check (push) Has been cancelled
CI / Rust Tests (push) Has been cancelled
CI / Frontend Check (push) Has been cancelled
CI / Build Tauri (macOS) (push) Has been cancelled
CI / Build Tauri (macOS Intel) (push) Has been cancelled
CI / Build Tauri (Linux) (push) Has been cancelled

Includes server (Rust/Axum API proxy with voice management),
Tauri desktop client with Svelte UI, bot-sdk, Docker infra
(Synapse, PostgreSQL, Coturn, Nginx), and CI/CD pipeline.
This commit is contained in:
root
2026-04-28 08:23:23 +02:00
commit 0978d0c2e9
82 changed files with 12417 additions and 0 deletions

76
infra/scripts/healthcheck.sh Executable file
View File

@@ -0,0 +1,76 @@
#!/bin/bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INFRA_DIR="$(dirname "$SCRIPT_DIR")"
echo "=== EifelDC Health Check ==="
echo ""
OK=true
check_service() {
local name=$1
local url=$2
local expected_status=${3:-200}
if curl -sf -o /dev/null -w "%{http_code}" "${url}" 2>/dev/null | grep -q "${expected_status}"; then
echo " [OK] ${name}"
else
echo " [FAIL] ${name} - ${url}"
OK=false
fi
}
if command -v docker &>/dev/null && [ -f "${INFRA_DIR}/docker-compose.yml" ]; then
echo "[Docker Mode]"
echo ""
echo "Container Status:"
cd "${INFRA_DIR}"
docker compose ps
echo ""
echo "Service Health:"
check_service "EifelDC Server" "http://localhost:3000/api/current-user" "401"
check_service "Synapse" "http://localhost:8008/_matrix/client/versions"
check_service "PostgreSQL" "localhost:5432"
echo ""
echo "Container Logs (last 5 lines):"
for svc in eifeldc synapse postgres nginx; do
if docker compose ps --services --filter "status=running" | grep -q "${svc}"; then
echo "--- ${svc} ---"
docker compose logs --tail=5 "${svc}" 2>/dev/null || true
fi
done
else
echo "[Native Mode]"
echo ""
echo "Service Health:"
check_service "EifelDC Server" "http://localhost:3000/api/current-user" "401"
check_service "Synapse" "http://localhost:8008/_matrix/client/versions"
check_service "Nginx" "http://localhost:80/"
echo ""
echo "Systemd Status:"
for svc in eifeldc-synapse eifeldc-server coturn nginx; do
status=$(systemctl is-active "${svc}" 2>/dev/null || echo "unknown")
if [ "$status" = "active" ]; then
echo " [OK] ${svc}: ${status}"
else
echo " [FAIL] ${svc}: ${status}"
OK=false
fi
done
fi
echo ""
if [ "$OK" = true ]; then
echo "=== All services healthy! ==="
exit 0
else
echo "=== Some services are not healthy! ==="
exit 1
fi