# Use an official Python runtime as a parent image FROM python:3.10-slim-buster # Set environment varibles ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 # Set work directory WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ gcc \ default-libmysqlclient-dev \ && rm -rf /var/lib/apt/lists/* # Install Python dependencies COPY requirements.txt /app/ RUN pip install --no-cache-dir -r requirements.txt # Copy project COPY . /app/ # Expose port EXPOSE 5000 # Run the application: CMD ["gunicorn", "-w", "4", "-k", "gevent", "api:app"]