- log rotation (50m x 3) for all services in both compose files - httpx logger -> WARNING: it logged every Telegram call with the bot token in the URL - LOG_LEVEL env (INFO default); admin_bot no longer forces the level via import-time basicConfig - periodic_check chatter (API dumps, timestamps, waits) moved to DEBUG - error_handler logs the real traceback (exc_info) plus the offending user/update - drop_pending_updates=False so /start during a restart isn't silently lost - TTS announcer behind optional TTS_URL (unreachable from prod, was failing on every event) - reject closed Lichess accounts on /addgamer (API answers 200 with disabled=true) - store Lichess' canonical username spelling; merge case-duplicate gamers at startup, case-insensitive unique index prevents new ones - reply with a hint on text outside the /addgamer flow and on non-text messages; one INFO line per incoming update for funnel visibility - gamer_added counter for successful adds; /setperiod localized (ru hour plurals) - drop hardcoded /home/vrubel path for help images Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
72 lines
1.6 KiB
YAML
72 lines
1.6 KiB
YAML
services:
|
|
lichess-api:
|
|
image: 192.168.8.174:3000/vrubel/lichess-api:latest
|
|
container_name: lichess-api
|
|
ports:
|
|
- "8002:8000"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
restart: always
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "50m"
|
|
max-file: "3"
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health').read()"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
lichess-bot:
|
|
image: 192.168.8.174:3000/vrubel/lichess-bot:latest
|
|
container_name: lichess-telegram-bot
|
|
volumes:
|
|
- ./data:/app/data
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- PYTHONPATH=/app
|
|
- PYTHONUNBUFFERED=1
|
|
network_mode: "host"
|
|
restart: always
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "50m"
|
|
max-file: "3"
|
|
depends_on:
|
|
- lichess-api
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:8002/health', timeout=5)"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
admin-bot:
|
|
image: 192.168.8.174:3000/vrubel/lichess-admin:latest
|
|
container_name: lichess-admin-bot
|
|
volumes:
|
|
- ./data:/app/data
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- PYTHONPATH=/app
|
|
- PYTHONUNBUFFERED=1
|
|
network_mode: "host"
|
|
restart: always
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "50m"
|
|
max-file: "3"
|
|
depends_on:
|
|
- lichess-api
|
|
|
|
networks:
|
|
default:
|
|
name: lichess-network
|