FROM python:3.11-slim WORKDIR /app # Install supervisord to manage two processes RUN apt-get update && apt-get install -y supervisor && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . # supervisord config COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf EXPOSE 7860 CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]