CLAUDE.md: Staging-Umgebung dokumentiert (Service, DB, .env, Workflow)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
68
CLAUDE.md
68
CLAUDE.md
@@ -220,3 +220,71 @@ Changelog-Kategorien in TaskMate:
|
|||||||
- 34 = Changelog Verwaltung
|
- 34 = Changelog Verwaltung
|
||||||
- 35 = Changelog Website
|
- 35 = Changelog Website
|
||||||
- 36 = Changelog TaskMate
|
- 36 = Changelog TaskMate
|
||||||
|
|
||||||
|
## Staging-Umgebung
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
staging:
|
||||||
|
url: https://staging.monitor.aegis-sight.de
|
||||||
|
server: 46.225.141.13 (gleicher Host wie Live)
|
||||||
|
pfad: /home/claude-dev/AegisSight-Monitor-staging
|
||||||
|
branch: develop
|
||||||
|
port: 18891 (Live: 8891)
|
||||||
|
service: aegis-monitor-staging.service (systemd)
|
||||||
|
venv: /home/claude-dev/AegisSight-Monitor-staging/venv (eigenes venv)
|
||||||
|
zugriff: Magic-Link-Login an info@aegis-sight.de (Cookie 30 Tage)
|
||||||
|
|
||||||
|
datenbank:
|
||||||
|
pfad: ~/AegisSight-Monitor-staging/data/osint.db
|
||||||
|
initial: einmalige Kopie der Live-DB
|
||||||
|
drift: gewollt - Aenderungen in Staging beeinflussen Live nicht
|
||||||
|
reseed_von_live: |
|
||||||
|
sudo systemctl stop aegis-monitor-staging
|
||||||
|
cp ~/AegisSight-Monitor/data/osint.db ~/AegisSight-Monitor-staging/data/osint.db
|
||||||
|
sudo systemctl start aegis-monitor-staging
|
||||||
|
|
||||||
|
besonderheiten_env:
|
||||||
|
JWT_SECRET: eigener fuer Staging (nicht Live-JWT)
|
||||||
|
MAGIC_LINK_BASE_URL: https://staging.monitor.aegis-sight.de (sonst leitet App zu Live)
|
||||||
|
TELEGRAM_API_ID: 0 # deaktiviert - verhindert Doppel-Login mit Live
|
||||||
|
TELEGRAM_API_HASH: 0
|
||||||
|
DB-Pfad: relative aus config.py (nutzt automatisch ~/AegisSight-Monitor-staging/data/)
|
||||||
|
|
||||||
|
auth_service:
|
||||||
|
pfad: /opt/aegis-staging-auth
|
||||||
|
service: aegis-monitor-staging-auth.service
|
||||||
|
port: 127.0.0.1:8095
|
||||||
|
cookie_domain: staging.monitor.aegis-sight.de
|
||||||
|
cookie_name: aegis_monitor_staging_auth
|
||||||
|
code_quelle: identisch zum Service auf 46.225.225.49 (eigene Konfig)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Workflow Staging -> Live
|
||||||
|
|
||||||
|
1. **Aenderung in develop machen** (im Staging-Verzeichnis):
|
||||||
|
```bash
|
||||||
|
cd ~/AegisSight-Monitor-staging
|
||||||
|
git checkout develop
|
||||||
|
# Aenderung
|
||||||
|
git add . && git commit -m ... && git push origin develop
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Staging aktualisieren** (aktuell manuell):
|
||||||
|
```bash
|
||||||
|
ssh claude-dev@46.225.141.13 'cd ~/AegisSight-Monitor-staging && git pull && sudo systemctl restart aegis-monitor-staging'
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **In https://staging.monitor.aegis-sight.de testen**
|
||||||
|
|
||||||
|
4. **Promote zu Live**: Pull Request develop -> main in Gitea, dann:
|
||||||
|
```bash
|
||||||
|
ssh claude-dev@46.225.141.13 'cd ~/AegisSight-Monitor && git pull'
|
||||||
|
# Live laeuft als loser uvicorn-Prozess (kein systemd) - manueller Restart
|
||||||
|
# bei Backend-Aenderungen noetig
|
||||||
|
```
|
||||||
|
|
||||||
|
### Offen (noch nicht implementiert)
|
||||||
|
|
||||||
|
- Auto-Deploy bei Push auf develop (Webhook-Listener)
|
||||||
|
- Promote-UI mit Ein-Klick-Button
|
||||||
|
- Live-Monitor auf systemd umstellen (~10s Downtime einmalig)
|
||||||
|
|||||||
In neuem Issue referenzieren
Einen Benutzer sperren