FROM python:3.9-slim WORKDIR /app # Copy requirements first for better caching COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the application COPY . . # Expose the port that FastAPI will run on EXPOSE 8000 # Set environment variables ENV PORT=8000 ENV CORS_ORIGIN=* # Run the FastAPI application using our startup script CMD ["python", "run.py"]