File size: 685 Bytes
8981bf6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Single-stage, slim image. Runs the offline stub by default — no API keys required.
FROM python:3.11-slim

ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1 \
    PORT=8000

WORKDIR /app

# Install dependencies first for better layer caching.
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

# App code and seed data.
COPY supportcopilot ./supportcopilot
COPY data ./data

# Run as a non-root user.
RUN useradd --create-home appuser && chown -R appuser /app
USER appuser

EXPOSE 8000

# Hugging Face Spaces / Render set $PORT; default to 8000 locally.
CMD ["sh", "-c", "python -m uvicorn supportcopilot.app:app --host 0.0.0.0 --port ${PORT:-8000}"]