# Pi Web direct previews: a thin streaming relay to the Pi Web gateway (see app.py). FROM python:3.12-slim COPY requirements.txt /opt/preview/requirements.txt RUN pip install --no-cache-dir -r /opt/preview/requirements.txt COPY app.py /opt/preview/app.py RUN chmod -R a+rX /opt/preview ENV PYTHONUNBUFFERED=1 EXPOSE 7860 # No access log: handshake URLs carry capabilities. CMD ["uvicorn", "app:app", "--app-dir", "/opt/preview", "--host", "0.0.0.0", "--port", "7860", \ "--proxy-headers", "--forwarded-allow-ips", "*", "--timeout-keep-alive", "75", "--no-access-log"]