Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 10m14s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Failing after 11m25s
Security Vulnerability Scan / Composer Security Audit (push) Has been cancelled
- Remove middleware reference from Gitea Traefik labels (caused routing issues) - Optimize Gitea connection pool settings (MAX_IDLE_CONNS=30, authentication_timeout=180s) - Add explicit service reference in Traefik labels - Fix intermittent 504 timeouts by improving PostgreSQL connection handling Fixes Gitea unreachability via git.michaelschiemer.de
129 lines
2.6 KiB
Markdown
129 lines
2.6 KiB
Markdown
# Deployment Scripts
|
|
|
|
Sammlung von nützlichen Scripts für Deployment und Wartung.
|
|
|
|
## Quick-Start Scripts
|
|
|
|
### staging-quick-start.sh
|
|
|
|
Interaktives Script für Staging-Deployment-Aufgaben.
|
|
|
|
**Verwendung**:
|
|
```bash
|
|
cd ~/deployment
|
|
./scripts/staging-quick-start.sh
|
|
```
|
|
|
|
**Funktionen**:
|
|
- PostgreSQL-Staging Stack starten
|
|
- PostgreSQL-Production Stack starten
|
|
- Networks prüfen
|
|
- Container-Status anzeigen
|
|
- Datenbank-Verbindungen testen
|
|
- Health-Checks durchführen
|
|
- Logs anzeigen
|
|
|
|
**Beispiel**:
|
|
```bash
|
|
# Auf Production-Server
|
|
cd ~/deployment
|
|
./scripts/staging-quick-start.sh
|
|
|
|
# Wähle Option 3: Beide PostgreSQL-Stacks starten
|
|
# Wähle Option 10: Alles verifizieren
|
|
```
|
|
|
|
### production-quick-start.sh
|
|
|
|
Interaktives Script für Production-Deployment-Aufgaben.
|
|
|
|
**Verwendung**:
|
|
```bash
|
|
cd ~/deployment
|
|
./scripts/production-quick-start.sh
|
|
```
|
|
|
|
**Funktionen**:
|
|
- PostgreSQL-Production Stack starten
|
|
- Networks prüfen
|
|
- Container-Status anzeigen
|
|
- Datenbank-Verbindungen testen
|
|
- Health-Checks durchführen
|
|
- Logs anzeigen
|
|
|
|
## Test-Scripts
|
|
|
|
### test-pipeline-prerequisites.sh
|
|
|
|
Prüft alle Voraussetzungen für CI/CD Pipeline-Tests.
|
|
|
|
**Verwendung:**
|
|
```bash
|
|
cd /home/michael/dev/michaelschiemer
|
|
./deployment/scripts/test-pipeline-prerequisites.sh
|
|
```
|
|
|
|
**Prüft:**
|
|
- Gitea Runner Status
|
|
- Workflow-Dateien
|
|
- Ansible Playbooks
|
|
- Docker Compose Files
|
|
- Dockerfile
|
|
- SSH Configuration
|
|
- Docker Registry Access
|
|
- Git Repository Configuration
|
|
|
|
**Ausgabe:**
|
|
- ✓ Grüne Checks für erfolgreiche Prüfungen
|
|
- ✗ Rote Checks für Fehler
|
|
- ⚠ Gelbe Warnungen für optionale Probleme
|
|
|
|
### test-backup.sh
|
|
|
|
Führt ein Test-Backup aus und verifiziert die Ergebnisse.
|
|
|
|
**Verwendung:**
|
|
```bash
|
|
cd /home/michael/dev/michaelschiemer
|
|
./deployment/scripts/test-backup.sh
|
|
```
|
|
|
|
**Führt aus:**
|
|
- Backup-Playbook mit Test-Konfiguration
|
|
- Backup-Verifikation
|
|
- Zeigt Backup-Location und nächste Schritte
|
|
|
|
**Nach dem Test:**
|
|
```bash
|
|
# Auf Server verifizieren
|
|
ssh deploy@94.16.110.151
|
|
ls -lh ~/deployment/backups/backup_*/
|
|
cat ~/deployment/backups/backup_*/backup_metadata.txt
|
|
```
|
|
|
|
## Weitere Scripts
|
|
|
|
Weitere nützliche Scripts können hier hinzugefügt werden:
|
|
- Rollback-Scripts
|
|
- Monitoring-Scripts
|
|
- Cleanup-Scripts
|
|
|
|
## Voraussetzungen
|
|
|
|
- Docker und Docker Compose installiert
|
|
- Bash Shell
|
|
- Zugriff auf Production-Server
|
|
- Stacks im erwarteten Pfad: `~/deployment/stacks/`
|
|
|
|
## Konfiguration
|
|
|
|
Scripts nutzen folgende Umgebungsvariablen (optional):
|
|
- `STACKS_BASE_PATH`: Basis-Pfad für Stacks (Standard: `~/deployment/stacks`)
|
|
|
|
**Beispiel**:
|
|
```bash
|
|
export STACKS_BASE_PATH=/opt/deployment/stacks
|
|
./scripts/staging-quick-start.sh
|
|
```
|
|
|