FROM python:3.11-slim # Set environment variables ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 ENV FLASK_APP=app # Install system dependencies RUN apt-get update && apt-get install -y \ curl \ && rm -rf /var/lib/apt/lists/* # Set work directory WORKDIR /app # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy project COPY . . # Copy the Python startup script COPY docker/start.py /app/start.py # Make executable RUN chmod +x /app/start.py # Verify startup script exists RUN ls -la /app/start.py && \ head -1 /app/start.py # Expose port EXPOSE 8080 # Run the application using Python CMD ["python", "/app/start.py"]