Team Ai
Apppublic

Decoder2704/python-chatbot-jay

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
DEPLOYMENT.md31 linesDownload Raw Back to docs
1# Deployment (Hugging Face Space — primary)2 3This repo is set up for a **single Docker Space**: one container runs **FastAPI** and the **Vite-built React** app. No separate frontend host is required.4 5| Topic | Doc |6|--------|-----|7| Space layout, files, troubleshooting | **`docs/HF_SPACE.md`** |8| Local Docker build & run | **`docs/DOCKER_LOCAL.md`** |9| Pre-push checklist | **`docs/PRE_DEPLOY_CHECKLIST.md`** |10 11**Entrypoints:** root **`Dockerfile`**, **`docker/entrypoint.sh`**, **`docker-compose.yml`** (local testing only).12 13**Environment:** `CORS_EXTRA_ORIGINS` is optional for same-origin Spaces; set comma-separated origins if the browser hits the API from a different host (e.g. split deploy).14 15---16 17## Optional: frontend and API on different hosts18 19If you host the static UI and the API separately (not the default for this repo):20 211. Set **`VITE_API_URL`** at the **frontend build** to the public API origin (no trailing slash).222. On the API, set **`CORS_EXTRA_ORIGINS`** to every origin that serves the UI (scheme + host + port). Local dev origins are already listed in `backend/app/main.py`.23 24The frontend client is **`frontend/src/services/api.js`** — `VITE_API_URL` overrides same-origin API calls when set.25 26---27 28## `backend/runtime.txt`29 30Optional **local** Python version hint (e.g. pyenv). The **Docker** image uses the Python version in **`Dockerfile`**, not this file.31