Boti su sedadla bez socketu: ucty bot:<kind>-<n> v tabulke players (nehijacknutelne, recyklovane medzi hrami), handlery add_bot/remove_bot (len hostitel, pred startom) a tahova slucka _run_bot_turns s pauzou BOT_MOVE_DELAY_SECONDS a MC/inferenciou v executori. Druhy: heuristic, random, neural (pure-Python siet; bez suboru vah jasna chyba a pri restore fallback na heuristiku). Botie sedadla preziju restart servera. Oprava po ceste: emit kariet hracovi so sid=None (offline sedadlo po restore) broadcastoval jeho karty vsetkym klientom -- preskakuje sa. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
25 lines
569 B
Docker
25 lines
569 B
Docker
FROM python:3.14-slim
|
|
|
|
WORKDIR /app
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1
|
|
|
|
COPY requirements.txt requirements.txt
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Backend code only -- the frontend has its own image (frontend/Dockerfile).
|
|
COPY bridzik.py app.py ./
|
|
COPY api ./api
|
|
COPY db ./db
|
|
COPY rl ./rl
|
|
COPY tests ./tests
|
|
|
|
RUN useradd --create-home --uid 1000 appuser \
|
|
&& chown -R appuser:appuser /app
|
|
USER appuser
|
|
|
|
EXPOSE 5000
|
|
|
|
# Serve the ASGI Socket.IO app with uvicorn.
|
|
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "5000"]
|