Files
Comparison_Project/Dockerfile

27 lines
633 B
Docker
Raw Permalink Normal View History

FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
2026-08-06 18:17:33 +05:30
default-libmysqlclient-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY requirements.txt .
2026-08-06 18:17:33 +05:30
RUN pip install --no-cache-dir -r requirements.txt gunicorn
# Copy application code
COPY . .
# Create necessary directories
RUN mkdir -p app/logs app/static/uploads app/static/downloads
2026-08-06 18:17:33 +05:30
ENV FLASK_APP=run.py
# Expose port
EXPOSE 5001
2026-08-06 18:17:33 +05:30
# Run the application with Gunicorn (production WSGI server)
CMD ["gunicorn", "--bind", "0.0.0.0:5001", "run:app"]