FROM python:3.10 # yt-dlpのBot回避機能に必要なNode.jsとffmpegをインストール RUN apt-get update && \ apt-get install -y ffmpeg curl && \ curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ apt-get install -y nodejs && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . # ▼▼▼ 修正: gthreadモードに変更 ▼▼▼ # -k gthread: 標準スレッドを使用 (Eventlet廃止) # -w 1: プロセスは1つのまま (Socket.IOの接続維持のため) # --threads 100: 1プロセス内で100スレッドまで立ち上げ可能にする CMD ["gunicorn", "-k", "gthread", "-w", "1", "--threads", "100", "-b", "0.0.0.0:7860", "--timeout", "120", "app:app"]