mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-24 23:56:40 +02:00
- Generate separate Ed25519 key for Forgejo Actions CI/CD pipeline - Document both keys with clear purpose separation: deploy_ed25519 = server access (manual/Claude) cicd_ed25519 = automated deployments (Forgejo Actions) - Add key placement matrix (which key goes where) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7.6 KiB
7.6 KiB
INSIGHT MVP - Zugangsdaten & Server-Zugriff
Dieses Dokument wird laufend aktualisiert und enthaelt alle relevanten Zugangsinformationen fuer das Projekt.
1. Git Repository
| Parameter | Wert |
|---|---|
| Git-Server | Forgejo (self-hosted) |
| URL | git.xinion.lan |
| Repository (SSH) | ssh://git@git.xinion.lan/gitadmin/INSIGHT-MVP.git |
| Repository (HTTP) | https://git.xinion.lan/gitadmin/INSIGHT-MVP |
| Organisation | gitadmin |
| Zugriff | SSH Key-basiert |
| CI/CD | Forgejo Actions (GitHub Actions kompatibel) |
| Container Registry | git.xinion.lan (Forgejo built-in) |
2. SSH Keys
Alle Keys liegen im Repository unter .keys/ (Repo ist nur intern verfuegbar).
2.1 Deploy Key (Server-Zugriff)
Fuer den SSH-Zugriff auf den Entwicklungsserver insight-dev-01.
| Datei | Beschreibung |
|---|---|
.keys/deploy_ed25519 |
Private Key (Server-Zugriff) |
.keys/deploy_ed25519.pub |
Public Key |
Public Key:
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMuTpqzLyjqTIDMJ4bwEE4o2JeHH3imL+NeipeuBfiTo insight-deploy@xinion.lan
Hinterlegen auf: Server insight-dev-01 in /home/deploy/.ssh/authorized_keys
2.2 CI/CD Key (Forgejo Actions)
Fuer automatisierte Deployments durch die Forgejo Actions CI/CD-Pipeline. Die Pipeline nutzt diesen Key, um sich per SSH auf den Server zu verbinden und Docker-Container zu aktualisieren.
| Datei | Beschreibung |
|---|---|
.keys/cicd_ed25519 |
Private Key (CI/CD Pipeline) |
.keys/cicd_ed25519.pub |
Public Key |
Public Key:
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINlPo+AvDMTMZC0G49o+kuU98/aC85N90QU3a+FaTjoG insight-cicd@xinion.lan
Hinterlegen auf:
- Server
insight-dev-01in/home/deploy/.ssh/authorized_keys - Forgejo: Repository Settings > Secrets (als
SSH_DEPLOY_KEYfuer Actions)
2.3 SSH-Verbindung zum Server
# Verbindung zum Entwicklungsserver:
ssh -i .keys/deploy_ed25519 deploy@<SERVER-IP>
# Mit SSH-Config (empfohlen):
# Eintrag in ~/.ssh/config:
Host insight-dev
HostName <SERVER-IP>
User deploy
IdentityFile ~/git.xinion.lan/INSIGHT-MVP/.keys/deploy_ed25519
StrictHostKeyChecking accept-new
2.4 Wo welcher Key hinterlegt werden muss
| Key | Server authorized_keys |
Forgejo Secrets |
|---|---|---|
| deploy | Ja | Nein |
| cicd | Ja | Ja (SSH_DEPLOY_KEY) |
3. Entwicklungsserver (ProxmoxVE VM)
| Parameter | Wert |
|---|---|
| Hostname | insight-dev-01 |
| OS | Ubuntu 24.04 LTS |
| IP | wird bei VM-Erstellung vergeben |
| SSH-Port | 22 |
| SSH-User | deploy |
| SSH-Key | .keys/deploy_ed25519 |
| Docker | Docker Engine + Compose Plugin |
| Projekt-Pfad | /home/deploy/insight/ |
Schnellzugriff nach VM-Setup
# SSH auf den Server
ssh -i .keys/deploy_ed25519 deploy@<SERVER-IP>
# Status aller Container pruefen
docker compose ps
# Logs eines Services
docker compose logs -f core
# Neustart aller Services
docker compose restart
# Nur Backend neustarten
docker compose restart core
4. Service-Ports (auf der VM)
| Service | Interner Port | Externer Port | URL |
|---|---|---|---|
| Traefik (HTTP) | 80 | 80 | http://insight-dev.xinion.lan |
| Traefik (HTTPS) | 443 | 443 | https://insight-dev.xinion.lan |
| Traefik Dashboard | 8080 | - | Nur intern |
| Core-Service | 3000 | - | Via Traefik: /api/v1/* |
| Frontend | 8080 | - | Via Traefik: /* |
| PostgreSQL | 5432 | - | Nur intern (Docker-Netzwerk) |
| PgBouncer | 6432 | - | Nur intern (Docker-Netzwerk) |
| Redis | 6379 | - | Nur intern (Docker-Netzwerk) |
| step-ca | 9000 | - | Nur intern (Docker-Netzwerk) |
Observability (nur intern, kein oeffentlicher Zugriff)
| Service | Port | Zugriff |
|---|---|---|
| Grafana | 3001 | SSH-Tunnel: ssh -L 3001:localhost:3001 deploy@<IP> |
| Prometheus | 9090 | Nur intern |
| Loki | 3100 | Nur intern |
| Tempo | 3200 | Nur intern |
5. Datenbank-Zugangsdaten
Echte Passwoerter stehen in der
.env-Datei auf dem Server. Niemals in Git committen!
| Parameter | Wert (Platzhalter) |
|---|---|
| DB-Host | pgbouncer (via Docker-Netzwerk) |
| DB-Port | 6432 |
| Core-DB-Name | platform_core |
| Tenant-DB-Schema | tenant_{slug} |
| DB-User | Siehe .env -> DB_USER |
| DB-Passwort | Siehe .env -> DB_PASSWORD |
6. Container Registry
| Parameter | Wert |
|---|---|
| Registry-URL | git.xinion.lan |
| Image-Prefix | git.xinion.lan/gitadmin/insight-{service} |
| Authentifizierung | Forgejo Login-Credentials |
Image-Namen
git.xinion.lan/gitadmin/insight-core:latest
git.xinion.lan/gitadmin/insight-core:develop
git.xinion.lan/gitadmin/insight-core:v0.1.0
git.xinion.lan/gitadmin/insight-frontend:latest
7. Deployment-Pfad
MacBook (Entwicklung)
|
| git push
v
Forgejo (git.xinion.lan)
|
| Forgejo Actions CI/CD
| - Lint, Type-Check, Tests, Build
| - Docker Image bauen & pushen
v
Server (insight-dev-01)
|
| docker compose pull && docker compose up -d
v
Laufende Anwendung
8. Wichtige Befehle
Vom MacBook aus
# Code pushen
git push origin develop
# SSH auf Server
ssh -i .keys/deploy_ed25519 deploy@<SERVER-IP>
# Grafana oeffnen (SSH-Tunnel)
ssh -L 3001:localhost:3001 -i .keys/deploy_ed25519 deploy@<SERVER-IP>
# Dann im Browser: http://localhost:3001
Auf dem Server
# Alle Services starten
docker compose up -d
# Mit Observability
docker compose -f docker-compose.yml -f docker-compose.observability.yml up -d
# Health-Check
curl http://localhost:3000/health
# Datenbank-Migration
docker compose exec core npx prisma migrate deploy
# Logs folgen
docker compose logs -f --tail=100