docker setup

This commit is contained in:
Mann Patel
2026-02-15 12:56:39 -07:00
parent 8242a466b3
commit e014603fb9
8 changed files with 156 additions and 321 deletions

35
backend/Dockerfile Normal file
View File

@@ -0,0 +1,35 @@
# Backend Dockerfile
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
ffmpeg \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first (for caching)
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create uploads directory
RUN mkdir -p /app/uploads
# Expose port
EXPOSE 5000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD curl -f http://localhost:5000/api/health || exit 1
# Run application
CMD ["python", "main.py"]