exwiseapi / Dockerfile
devnamdev2003
up4
1d8dc03
raw
history blame
525 Bytes
FROM python:3.13.5-slim
# Create non-root user (HF requirement)
RUN useradd -m -u 1000 user
# Set work directory
WORKDIR /home/user/app
# Copy requirements first (better cache)
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY . .
# Switch to non-root user
USER user
# Expose HF port
EXPOSE 7860
# Run Django with Gunicorn (PRODUCTION SAFE)
CMD sh -c "python manage.py migrate && gunicorn expensewise_api.wsgi:application --bind 0.0.0.0:7860"