# Use an official Python runtime as a parent image FROM python:3.10-slim # Set the working directory in the container WORKDIR /app # Install ffmpeg, which is a system dependency for moviepy RUN apt-get update && apt-get install -y ffmpeg # Copy the requirements file into the container at /app COPY requirements.txt . # Install any needed packages specified in requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of your application's code into the container at /app # This includes app.py and the 'templates' folder COPY . . # Make port 5000 available to the world outside this container EXPOSE 5000 # Define the command to run your app # We use Gunicorn here for better production performance than 'flask run' # First, install Gunicorn RUN pip install gunicorn CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]