Initial commit: Casino bot

This commit is contained in:
2025-08-28 02:51:39 -05:00
commit 45afb95d14
19 changed files with 3119 additions and 0 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y sqlite3 && rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY src ./src
RUN mkdir -p /app/data
# non-root
RUN useradd -r -s /bin/false botuser && chown -R botuser:botuser /app
USER botuser
# healthcheck: open/close DB
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import sqlite3; sqlite3.connect('/app/data/blackjack.db').close()" || exit 1
CMD ["python", "-m", "src.bot"]