fix: Gitea Traefik routing and connection pool optimization
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
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
This commit is contained in:
61
deployment/scripts/test-backup.sh
Executable file
61
deployment/scripts/test-backup.sh
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
# Test Backup Playbook
|
||||
# Führt ein Test-Backup aus und verifiziert die Ergebnisse
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ANSIBLE_DIR="$SCRIPT_DIR/../ansible"
|
||||
|
||||
echo "=========================================="
|
||||
echo "Backup Playbook Test"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
|
||||
# Check if we're in the right directory
|
||||
if [ ! -f "$ANSIBLE_DIR/playbooks/backup.yml" ]; then
|
||||
echo "Error: backup.yml not found at $ANSIBLE_DIR/playbooks/backup.yml"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if inventory exists
|
||||
if [ ! -f "$ANSIBLE_DIR/inventory/production.yml" ]; then
|
||||
echo "Error: production.yml inventory not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if vault password file exists
|
||||
VAULT_PASS_FILE="$ANSIBLE_DIR/secrets/.vault_pass"
|
||||
if [ ! -f "$VAULT_PASS_FILE" ]; then
|
||||
echo "Warning: Vault password file not found at $VAULT_PASS_FILE"
|
||||
echo "Creating empty vault password file..."
|
||||
touch "$VAULT_PASS_FILE"
|
||||
chmod 600 "$VAULT_PASS_FILE"
|
||||
fi
|
||||
|
||||
echo "Running backup playbook..."
|
||||
echo ""
|
||||
|
||||
cd "$ANSIBLE_DIR"
|
||||
|
||||
ansible-playbook -i inventory/production.yml \
|
||||
playbooks/backup.yml \
|
||||
--vault-password-file "$VAULT_PASS_FILE" \
|
||||
-e "backup_retention_days=1" \
|
||||
-e "verify_backups=true"
|
||||
|
||||
echo ""
|
||||
echo "=========================================="
|
||||
echo "Backup Test Complete"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo "1. Verify backup files were created on the server"
|
||||
echo "2. Check backup metadata file"
|
||||
echo "3. (Optional) Test restore process"
|
||||
echo ""
|
||||
echo "To verify backups on server:"
|
||||
echo " ssh deploy@94.16.110.151"
|
||||
echo " ls -lh ~/backups/backup_*/"
|
||||
echo " cat ~/backups/backup_*/backup_metadata.txt"
|
||||
|
||||
Reference in New Issue
Block a user