chore: complete update

This commit is contained in:
2025-07-17 16:38:55 +02:00
parent 64a7051137
commit ec5526e2b2
46 changed files with 3139 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
#!/bin/bash
# Cache Warming Script
INVENTORY_FILE="inventories/production/hosts.yml"
# URLs zum Cache-Warming
URLS=(
"/"
"/health"
# Füge hier deine wichtigsten URLs hinzu:
# "/css/main.css"
# "/js/app.js"
# "/images/logo.png"
)
echo "🔥 Starting cache warming for all CDN nodes..."
# Hole alle CDN Node Hostnamen
CDN_NODES=$(ansible-inventory -i $INVENTORY_FILE --list | jq -r '.cdn_nodes.hosts[]' 2>/dev/null || ansible cdn_nodes -i $INVENTORY_FILE --list-hosts | grep -v hosts)
for node in $CDN_NODES; do
echo "Warming cache for: $node"
for url in "${URLS[@]}"; do
echo " Warming: $url"
response=$(curl -s -o /dev/null -w "%{http_code}" "https://${node}${url}" || echo "000")
if [ "$response" = "200" ]; then
echo " ✅ OK"
else
echo " ❌ Failed (HTTP $response)"
fi
sleep 0.5
done
echo ""
done
echo "🎉 Cache warming completed!"