Telegram port of the Discord notifier: tokenless decapi.me status checks, photo+caption announce with inline link buttons, /stream_test command. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
21 lines
569 B
Docker
21 lines
569 B
Docker
FROM python:3.12-slim
|
|
|
|
# Не создавать .pyc и не буферизовать stdout (чтобы логи шли в реальном времени)
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1
|
|
|
|
WORKDIR /app
|
|
|
|
# Сначала зависимости — для кэша слоёв
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Затем код
|
|
COPY bot.py .
|
|
|
|
# Запуск от непривилегированного пользователя
|
|
RUN useradd --create-home appuser
|
|
USER appuser
|
|
|
|
CMD ["python", "bot.py"]
|