Introduced a comprehensive guide on setting up Git-based deployment for the "Zora" server, including environment setup, repository initialization, and deployment workflow. Added `deploy.sh` script to streamline updates and restarts.
23 lines
466 B
Bash
23 lines
466 B
Bash
#!/bin/bash
|
|
# deploy.sh - Update & Restart Meldestelle Stack
|
|
|
|
echo "🚀 Starte Deployment..."
|
|
|
|
# 1. Neueste Konfiguration holen
|
|
echo " -> Git Pull..."
|
|
git pull origin main
|
|
|
|
# 2. Neue Images laden
|
|
echo " -> Docker Pull..."
|
|
docker compose pull
|
|
|
|
# 3. Container neu starten (nur geänderte)
|
|
echo " -> Docker Up..."
|
|
docker compose up -d --remove-orphans
|
|
|
|
# 4. Aufräumen
|
|
echo " -> Pruning old images..."
|
|
docker image prune -f
|
|
|
|
echo "✅ Deployment erfolgreich!"
|