#!/bin/bash
set -e

echo "🚀 Aziros deploying..."

cd ~/aziros

# Migrations ausführen
docker compose exec app php artisan migrate --force

# Cache leeren
docker compose exec app php artisan config:clear
docker compose exec app php artisan cache:clear
docker compose exec app php artisan view:clear
docker compose exec app php artisan route:clear

# Caches neu aufbauen
docker compose exec app php artisan config:cache
docker compose exec app php artisan route:cache
docker compose exec app php artisan view:cache

echo "✅ Deploy fertig!"