FROM python:3.9-slim WORKDIR /app # Install supervisord RUN apt-get update && apt-get install -y supervisor && rm -rf /var/lib/apt/lists/* # Copy everything COPY . . # Install backend dependencies RUN pip install --no-cache-dir -r backend_files/requirements.txt # Install frontend dependencies RUN pip install --no-cache-dir -r frontend_files/requirements.txt # Create supervisor config RUN mkdir -p /etc/supervisor/conf.d COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Expose ports EXPOSE 7860 8501 # Run supervisord CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]