Files
michaelschiemer/deployment/GIT_DEPLOYMENT_ISSUE.md
Michael Schiemer c087d372c2 Update Docker Registry URLs to HTTPS endpoint (registry.michaelschiemer.de)
- Replace git.michaelschiemer.de:5000 (HTTP) with registry.michaelschiemer.de (HTTPS)
- Update all Ansible playbooks and configuration files
- Update CI/CD workflows to use HTTPS registry endpoint
- Update Docker Compose files with new registry URL
- Update documentation and scripts

Benefits:
- Secure HTTPS connection (no insecure registry config needed)
- Consistent use of HTTPS endpoint via Traefik
- Better security practices for production deployment
2025-10-31 14:35:39 +01:00

74 lines
1.8 KiB
Markdown

# Git Deployment - Problem gefunden
**Datum:** 2025-01-31
**Status:** ⚠️ Image muss neu gepusht werden
## 🔍 Problem identifiziert
### Prüfung ergab:
- ❌ Keine Git-Logs im Container
-`GIT_REPOSITORY_URL` nicht als Environment-Variable gesetzt
- ❌ Kein `.git` Verzeichnis im Container
- ❌ Entrypoint-Script zeigt keine Git-Funktionalität
### Ursache:
**Das Image auf dem Production-Server enthält noch die alte Version ohne Git-Funktionalität.**
Das lokal gebaute Image wurde noch nicht zur Registry gepusht, daher verwendet der Production-Server noch das alte Image.
---
## ✅ Lösung
### Schritt 1: Image zur Registry pushen
```bash
# Lokal (auf Dev-Machine)
docker push registry.michaelschiemer.de/framework:latest
```
### Schritt 2: Image auf Production-Server aktualisieren
```bash
# Via Ansible
cd deployment/ansible
ansible production -i inventory/production.yml -m shell -a "docker pull registry.michaelschiemer.de/framework:latest"
```
### Schritt 3: Container neu starten
```bash
# Via Ansible
cd deployment/ansible
ansible-playbook -i inventory/production.yml playbooks/sync-code.yml -e "git_repo_url=https://git.michaelschiemer.de/michael/michaelschiemer.git" -e "git_branch=main"
```
**Oder direkt:**
```bash
# Auf Production-Server
cd ~/deployment/stacks/application
docker compose pull app
docker compose up -d app
```
---
## 🔄 Alternativer Workflow
Falls du das Image über die CI/CD Pipeline pushen möchtest:
1. **Commit und Push** der Änderungen zu `main`
2. **CI/CD Pipeline** baut automatisch das Image und pusht es
3. **Dann** `sync-code.yml` ausführen
---
## 📋 Checkliste
- [ ] Image lokal gebaut ✅
- [ ] Git-Variablen in .env gesetzt ✅
- [ ] Image zur Registry pushen ❌ **TODO**
- [ ] Image auf Production-Server pullen ❌ **TODO**
- [ ] Container neu starten ❌ **TODO**
- [ ] Logs prüfen ❌ **TODO**