Change API host port to 8002

This commit is contained in:
vrubelroman 2026-03-21 23:14:51 +03:00
parent 63e28c279c
commit 0e3a0bfc48
4 changed files with 7 additions and 9 deletions

View file

@ -26,7 +26,7 @@ else:
# Lichess API Configuration # Lichess API Configuration
LICHESS_API_BASE_URL = "https://lichess.org/api" LICHESS_API_BASE_URL = "https://lichess.org/api"
LICHESS_STATS_API_BASE_URL = "http://localhost:8001" # For Docker container access LICHESS_STATS_API_BASE_URL = "http://localhost:8002" # Host port for stats API when bot runs with host networking
# Минимальная задержка (сек) между запросами к Lichess в очереди мониторинга (избежание бана) # Минимальная задержка (сек) между запросами к Lichess в очереди мониторинга (избежание бана)
LICHESS_REQUEST_QUEUE_MIN_DELAY = 4.0 LICHESS_REQUEST_QUEUE_MIN_DELAY = 4.0

View file

@ -13,10 +13,10 @@ fi
# Check if the API service is running # Check if the API service is running
echo "🔍 Checking Lichess API service..." echo "🔍 Checking Lichess API service..."
if curl -s http://localhost:8001/docs > /dev/null 2>&1; then if curl -s http://localhost:8002/docs > /dev/null 2>&1; then
echo "✅ Lichess API service is running on http://localhost:8001" echo "✅ Lichess API service is running on http://localhost:8002"
else else
echo "⚠️ Warning: Lichess API service is not accessible at http://localhost:8001" echo "⚠️ Warning: Lichess API service is not accessible at http://localhost:8002"
echo " Make sure your API service is running before starting the bot." echo " Make sure your API service is running before starting the bot."
fi fi

View file

@ -4,7 +4,7 @@ services:
build: ./LichessWebServices build: ./LichessWebServices
container_name: lichess-api container_name: lichess-api
ports: ports:
- "8001:8000" - "8002:8000"
environment: environment:
- PYTHONUNBUFFERED=1 - PYTHONUNBUFFERED=1
volumes: volumes:
@ -32,7 +32,7 @@ services:
depends_on: depends_on:
- lichess-api - lichess-api
healthcheck: healthcheck:
test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:8001/health', timeout=5)"] test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:8002/health', timeout=5)"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3
@ -74,4 +74,3 @@ networks:

View file

@ -53,7 +53,7 @@ echo ""
echo "✅ Все сервисы запущены!" echo "✅ Все сервисы запущены!"
echo "" echo ""
echo "🌐 Доступные сервисы:" echo "🌐 Доступные сервисы:"
echo " - API документация: http://localhost:8001/docs" echo " - API документация: http://localhost:8002/docs"
echo " - Веб-интерфейс: http://localhost:5000" echo " - Веб-интерфейс: http://localhost:5000"
echo "" echo ""
echo "📋 Для просмотра логов используйте:" echo "📋 Для просмотра логов используйте:"
@ -64,4 +64,3 @@ echo " ${COMPOSE_CMD_DISPLAY} down"