Download Dockerfile from Seth0330/EMAILOUT: direct link, hf CLI and curl.
- Browser
- Download file 990 Bytes
-
https://huggingface.co/spaces/Seth0330/EMAILOUT/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Seth0330/EMAILOUT/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Seth0330/EMAILOUT/resolve/main/Dockerfile
990 Bytes
| # ---------- build frontend ---------- | |
| FROM node:20-bookworm AS frontend-build | |
| WORKDIR /frontend | |
| COPY frontend/package.json frontend/package-lock.json* ./ | |
| RUN npm install | |
| COPY frontend/ . | |
| RUN npm run build | |
| # ---------- runtime ---------- | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Create data directory for persistent storage | |
| RUN mkdir -p /data/uploads | |
| # Backend deps | |
| COPY backend/requirements.txt /app/backend/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/backend/requirements.txt | |
| # Copy backend code | |
| COPY backend /app/backend | |
| # Copy frontend build into /app/frontend/dist | |
| COPY --from=frontend-build /frontend/dist /app/frontend/dist | |
| # HF Spaces uses port 7860 | |
| EXPOSE 7860 | |
| # Set PYTHONPATH to include backend directory | |
| ENV PYTHONPATH=/app/backend:$PYTHONPATH | |
| # --proxy-headers: X-Forwarded-Proto/Host from Hugging Face edge so OAuth redirect_uri is https:// | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--app-dir", "/app/backend", "--proxy-headers"] | |