73 lines
2.0 KiB
Markdown
73 lines
2.0 KiB
Markdown
# Git Deployment Test - Ergebnis
|
|
|
|
**Datum:** 2025-01-31
|
|
**Status:** ✅ Ansible Playbook erfolgreich ausgeführt
|
|
|
|
## ✅ Erfolgreiche Schritte
|
|
|
|
1. **Ansible Playbook ausgeführt**
|
|
- `.env` Datei wurde aktualisiert mit:
|
|
- `GIT_REPOSITORY_URL=https://git.michaelschiemer.de/michael/michaelschiemer.git`
|
|
- `GIT_BRANCH=main`
|
|
|
|
2. **Container neu gestartet**
|
|
- Container wurde erfolgreich neu gestartet
|
|
- Git-Sync sollte beim Start ausgeführt werden
|
|
|
|
3. **Nächster Schritt: Logs prüfen**
|
|
- Git-Logs wurden im Playbook-Output nicht gefunden
|
|
- Möglicherweise wurden sie noch nicht generiert oder sind in den Logs vorhanden
|
|
|
|
---
|
|
|
|
## 🔍 Verifikation nötig
|
|
|
|
Bitte prüfe die Container-Logs direkt auf dem Production-Server:
|
|
|
|
```bash
|
|
ssh deploy@94.16.110.151
|
|
docker logs app --tail 100 | grep -E "(Git|Clone|Pull|✅|❌)"
|
|
```
|
|
|
|
**Oder vollständige Logs:**
|
|
```bash
|
|
docker logs app --tail 100
|
|
```
|
|
|
|
**Erwartete Logs:**
|
|
```
|
|
📥 Cloning/Pulling code from Git repository...
|
|
📥 Cloning repository from https://git.michaelschiemer.de/... (branch: main)
|
|
📦 Installing/updating Composer dependencies...
|
|
✅ Git sync completed
|
|
```
|
|
|
|
---
|
|
|
|
## 🚨 Falls keine Git-Logs vorhanden sind
|
|
|
|
**Mögliche Ursachen:**
|
|
1. Container verwendet noch altes Image ohne Git-Funktionalität
|
|
2. Entrypoint-Script wurde nicht korrekt kopiert
|
|
3. Environment-Variablen werden nicht korrekt geladen
|
|
|
|
**Lösung:**
|
|
1. Prüfe ob Image aktualisiert wurde: `docker images registry.michaelschiemer.de/framework:latest`
|
|
2. Prüfe Entrypoint: `docker exec app cat /usr/local/bin/entrypoint.sh | grep GIT_REPOSITORY_URL`
|
|
3. Prüfe Environment: `docker exec app env | grep GIT_REPOSITORY_URL`
|
|
|
|
---
|
|
|
|
## ✅ Nächste Schritte
|
|
|
|
1. **Logs prüfen** (siehe oben)
|
|
2. **Code-Verifikation im Container:**
|
|
```bash
|
|
docker exec app ls -la /var/www/html/ | head -20
|
|
docker exec app test -d /var/www/html/.git && echo "✅ Git repo vorhanden" || echo "❌ Fehlt"
|
|
```
|
|
3. **Application Health Check:**
|
|
```bash
|
|
curl -f https://michaelschiemer.de/health
|
|
```
|