Add Dockerfile

This commit is contained in:
Benjamin Tan 2025-12-15 17:29:34 +00:00
parent f19b2b4965
commit 95e99f1c1d

25
Dockerfile Normal file
View file

@ -0,0 +1,25 @@
# Use a lightweight Python image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies (optional but safe)
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first (better Docker caching)
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app.py .
# Expose the port Gunicorn will listen on
EXPOSE 3001
# Run Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:3001", "app:app"]