Installation
TeamVis läuft als Next.js 16 standalone Container mit Supabase (Postgres + Storage) als Backend. Empfohlen für die Bereitstellung: Caddy als Reverse-Proxy mit Auto-HTTPS.
Voraussetzungen
- Linux-VPS (1 vCPU, 2 GB RAM reichen für ~200 MA)
- Docker + Docker Compose
- Supabase-Projekt (gehostet bei supabase.com oder self-hosted — das Projekt nutzt nur das Postgres-/Storage-Schema, keine Supabase-Auth)
- Domain mit DNS-A-Record auf den Server
Schritt 1 — Repo klonen
git clone https://gitlab.example.com/teamvis.git /opt/teamviscd /opt/teamvisSchritt 2 — .env
Lege /opt/teamvis/.env an:
NEXT_PUBLIC_SUPABASE_URL=https://<project>.supabase.coNEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOi…SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOi…SESSION_SECRET=<min 32 Zeichen Zufall>NEXT_PUBLIC_SITE_URL=https://team.deine-domain.de
# Optional: SMTP für Self-Service-PortalSMTP_HOST=mail.beispiel.deSMTP_PORT=587SMTP_SECURE=falseSMTP_PASS=…SMTP_FROM_NAME=TeamVisSchritt 3 — Migrationen einspielen
In Supabase SQL Editor (oder via psql) alle Migrationen aus
supabase/migrations/ in numerischer Reihenfolge ausführen.
Das sind Stand 2026-05 die Migrationen 0001_rls.sql bis
0026_magic_link_tokens.sql.
Schritt 4 — Container bauen + starten
docker compose build appdocker compose up -dSchritt 5 — Caddy
/etc/caddy/Caddyfile:
team.deine-domain.de { reverse_proxy 127.0.0.1:3001}sudo systemctl reload caddy — Caddy holt automatisch ein
Let’s-Encrypt-Zertifikat.
Schritt 6 — Erster Admin
Direkt in Supabase, Tabelle admin_users:
insert into admin_users (email, password_hash)bcrypt-Hash erzeugen z.B. mit htpasswd -nbBC 12 "" PASSWORT | tr -d ':\n' | sed 's/$2y/$2a/'.
Schritt 7 — Storage-Bucket
In Supabase: Storage → Bucket employee-photos anlegen, Public.
RLS-Policies kommen aus Migration 0001.
Updates
cd /opt/teamvisgit pull --rebasedocker compose build appdocker compose up -d --force-recreateBei neuen Migrationen: in Supabase SQL Editor ausführen, bevor der Container neu startet.