Spaces:
Runtime error

eDataScientist
Claude
Change application port from 7860 to 8080
57dda9e
Raw History Blame Contribute Delete
854 Bytes
# Use official Python runtime as base image
FROM python:3.13
# Set working directory in container
WORKDIR /app
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PORT=8080
# Install system dependencies required for pdfplumber and Pillow
RUN apt-get update && apt-get install -y \
libpoppler-cpp-dev \
poppler-utils \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY app.py .
COPY .env .
# Expose the port the app runs on
EXPOSE 8080
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import requests; requests.get('http://localhost:8080')" || exit 1
# Run the application
CMD ["python", "app.py"]