web-scraper / Dockerfile
simar007's picture
Upload Dockerfile
efe4a93 verified
raw
history blame contribute delete
492 Bytes
# Use a lightweight Python base image
FROM python:3.11-slim
# Set work directory
WORKDIR /app
# Copy requirements and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy all project files
COPY . .
# Expose the port Hugging Face expects
EXPOSE 7860
# Set environment variable for Flask
ENV PORT=7860
ENV FLASK_APP=app.py
ENV FLASK_ENV=production
# Command to run Flask via Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]