2025-10-26 20:23:26 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
# Lichess Telegram Bot Runner Script
|
|
|
|
|
|
|
|
|
|
echo "🎯 Lichess Telegram Bot"
|
|
|
|
|
echo "======================"
|
|
|
|
|
|
|
|
|
|
# Check if Docker is running
|
|
|
|
|
if ! docker info > /dev/null 2>&1; then
|
|
|
|
|
echo "❌ Docker is not running. Please start Docker first."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Check if the API service is running
|
|
|
|
|
echo "🔍 Checking Lichess API service..."
|
2026-03-21 23:14:51 +03:00
|
|
|
if curl -s http://localhost:8002/docs > /dev/null 2>&1; then
|
|
|
|
|
echo "✅ Lichess API service is running on http://localhost:8002"
|
2025-10-26 20:23:26 +03:00
|
|
|
else
|
2026-03-21 23:14:51 +03:00
|
|
|
echo "⚠️ Warning: Lichess API service is not accessible at http://localhost:8002"
|
2025-10-26 20:23:26 +03:00
|
|
|
echo " Make sure your API service is running before starting the bot."
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
echo "🚀 Starting Lichess Telegram Bot..."
|
|
|
|
|
|
|
|
|
|
# Build and start the bot
|
|
|
|
|
docker-compose up --build -d
|
|
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
echo "✅ Bot started successfully!"
|
|
|
|
|
echo ""
|
|
|
|
|
echo "📊 To view logs:"
|
|
|
|
|
echo " docker-compose logs -f lichess-bot"
|
|
|
|
|
echo ""
|
|
|
|
|
echo "🛑 To stop the bot:"
|
|
|
|
|
echo " docker-compose down"
|
|
|
|
|
echo ""
|
|
|
|
|
echo "🔧 To restart the bot:"
|
|
|
|
|
echo " docker-compose restart lichess-bot"
|
|
|
|
|
echo ""
|
|
|
|
|
echo "📱 Your bot is now running! Find it in Telegram and start chatting."
|