mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-14 06:17:23 +00:00
pip install docsgpt now brings the web UI with it: `docsgpt api` serves the API and the UI on one port. - scripts/build_frontend.sh builds the frontend into docsgpt/static (gitignored) the way the frontend image does: .env.development as the production baseline, and index.html loading /config.js ahead of the bundle. hatch admits the directory into the wheel and the sdist through `artifacts`; the package workflows run the script before `uv build` and fail if the wheel lacks the UI. The backend image keeps ignoring it. - docsgpt/ui.py serves the build in front of Flask: files as they are, hashed assets immutable, Flask's own path prefixes (taken from its URL map, so new blueprints need no registration) passed through, every other GET rendered as index.html for the client-side router. /config.js is generated per request with VITE_API_HOST and VITE_BASE_URL set to the page's origin, VITE_* environment variables winning. SERVE_UI=false leaves the API alone. - docsgpt api configures gunicorn in code (gunicorn.app.base.Application) instead of rewriting sys.argv, so the SIGUSR2 re-exec that gunicorn uses for zero-downtime upgrades runs the docsgpt console script again and works; verified with a live handover. - Docs: the pip page says the UI is included, that DOCSGPT_HOME and DOCSGPT_ENV_FILE are process environment variables rather than .env entries, and the settings page describes SERVE_UI.
28 lines
842 B
Plaintext
28 lines
842 B
Plaintext
# Build context for docsgpt/Dockerfile is the repository root, so the image can
|
|
# carry the `application` import alias next to the `docsgpt` package. Allow only
|
|
# what the image needs; everything else (frontend, docs, tests, venvs) stays out.
|
|
*
|
|
!docsgpt/
|
|
# Only the alias file: an upgraded checkout may still hold gitignored
|
|
# application/{inputs,indexes,vectors,.env} from the old layout.
|
|
!application/__init__.py
|
|
|
|
# Inside the package: caches, local runtime data and secrets never ship.
|
|
**/__pycache__/
|
|
**/*.py[cod]
|
|
docsgpt/.pytest_cache/
|
|
docsgpt/.ruff_cache/
|
|
docsgpt/.coverage
|
|
docsgpt/htmlcov/
|
|
docsgpt/*.log
|
|
docsgpt/indexes/
|
|
docsgpt/inputs/
|
|
docsgpt/vectors/
|
|
docsgpt/*.faiss
|
|
docsgpt/*.pkl
|
|
docsgpt/.env
|
|
docsgpt/.env.*
|
|
docsgpt/Dockerfile
|
|
# The backend image serves no UI (the frontend image does); a local UI build stays out.
|
|
docsgpt/static/
|