Change API host port to 8002
This commit is contained in:
parent
63e28c279c
commit
0e3a0bfc48
4 changed files with 7 additions and 9 deletions
|
|
@ -26,7 +26,7 @@ else:
|
|||
|
||||
# Lichess API Configuration
|
||||
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_REQUEST_QUEUE_MIN_DELAY = 4.0
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ fi
|
|||
|
||||
# Check if the API service is running
|
||||
echo "🔍 Checking Lichess API service..."
|
||||
if curl -s http://localhost:8001/docs > /dev/null 2>&1; then
|
||||
echo "✅ Lichess API service is running on http://localhost:8001"
|
||||
if curl -s http://localhost:8002/docs > /dev/null 2>&1; then
|
||||
echo "✅ Lichess API service is running on http://localhost:8002"
|
||||
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."
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ services:
|
|||
build: ./LichessWebServices
|
||||
container_name: lichess-api
|
||||
ports:
|
||||
- "8001:8000"
|
||||
- "8002:8000"
|
||||
environment:
|
||||
- PYTHONUNBUFFERED=1
|
||||
volumes:
|
||||
|
|
@ -32,7 +32,7 @@ services:
|
|||
depends_on:
|
||||
- lichess-api
|
||||
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
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
|
@ -74,4 +74,3 @@ networks:
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
3
start.sh
3
start.sh
|
|
@ -53,7 +53,7 @@ echo ""
|
|||
echo "✅ Все сервисы запущены!"
|
||||
echo ""
|
||||
echo "🌐 Доступные сервисы:"
|
||||
echo " - API документация: http://localhost:8001/docs"
|
||||
echo " - API документация: http://localhost:8002/docs"
|
||||
echo " - Веб-интерфейс: http://localhost:5000"
|
||||
echo ""
|
||||
echo "📋 Для просмотра логов используйте:"
|
||||
|
|
@ -64,4 +64,3 @@ echo " ${COMPOSE_CMD_DISPLAY} down"
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue