#!/bin/bash
# Restart backend containers to pick up code changes

echo "🛑 Stopping backend containers..."
docker stop igny8_backend igny8_celery_worker igny8_celery_beat

echo "⏳ Waiting 3 seconds..."
sleep 3

echo "🚀 Starting backend containers..."
docker start igny8_backend igny8_celery_worker igny8_celery_beat

echo "⏳ Waiting 5 seconds for containers to initialize..."
sleep 5

echo "📋 Checking container status..."
docker ps --filter "name=igny8" --format "   {{.Names}} | {{.Status}}"

echo ""
echo "📝 Checking backend logs for errors..."
docker logs igny8_backend --tail 20

