FROM python:3.12-slim

# Установим системные зависимости, нужные для mysqlclient и других пакетов
RUN apt-get update && apt-get install -y \
    build-essential \
    default-libmysqlclient-dev \
    libmariadb-dev \
    pkg-config \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY docker/flower.requirements.txt ./
RUN pip install --no-cache-dir -r flower.requirements.txt

CMD ["python", "-m", "celery", "-A", "lottery", "flower", "--port=5555", "--basic_auth=admin:secret", "-b", "redis://redis:6379/0"]
