Dockerize chat_backend + Ollama LAN + DB file storage (#6) (#7)
Unit Tests / test (push) Successful in 13s
Unit Tests / test (push) Successful in 13s
## Summary Implements [chat_backend#6](#6) Part A: - **uv** packaging (`pyproject.toml` + `uv.lock`), Docker/compose (dev + prod), entrypoint/validate-env, Gitea unit-test + auto-deploy workflows (mirror `scha`) - Env-driven Django settings (`DJANGO_*`, `DATABASE_URL`, CSRF/CORS) - **`OLLAMA_BASE_URL`** wired through all Ollama/LangChain clients (prod → `http://10.0.0.128:11434`) - **DatabaseStorage** — prompt/document file blobs in Postgres (`StoredFile`), not container FS; RAG materializes temp paths for loaders - ASGI via `gunicorn` + `UvicornWorker` (HTTP + WebSockets) Companion server-infra PR registers `app_catalog` / `host_apps` (port **8003**). ## Test plan - [ ] `uv sync && cd llm_be && SKIP_RAG_INIT=1 uv run python manage.py test` - [ ] `docker compose build && docker compose up` against bundled Postgres - [ ] Confirm Ollama calls use `OLLAMA_BASE_URL` (not hardcoded localhost) - [ ] Upload a document / prompt file → row in `chat_backend_storedfile`, no disk under `media/` - [ ] After server-infra merge + secret/Postgres/NPM: deploy via `deploy.sh --app chat_backend --env prod`Reviewed-on: #7
This commit was merged in pull request #7.
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
[project]
|
||||
name = "chat-backend"
|
||||
version = "0.1.0"
|
||||
description = "Django chat backend for AIML Operations"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
dependencies = [
|
||||
"Django==6.0",
|
||||
"channels==4.3.2",
|
||||
"daphne==4.2.1",
|
||||
"uvicorn==0.38.0",
|
||||
"gunicorn==23.0.0",
|
||||
"psycopg2-binary==2.9.10",
|
||||
"whitenoise==6.9.0",
|
||||
"djangorestframework==3.16.1",
|
||||
"djangorestframework-simplejwt==5.5.1",
|
||||
"django-cors-headers==4.9.0",
|
||||
"django-autoslug==1.9.9",
|
||||
"django-filter==25.2",
|
||||
"ollama==0.6.1",
|
||||
"langchain==1.1.2",
|
||||
"langchain-core==1.1.1",
|
||||
"langchain-community==0.4.1",
|
||||
"langchain-classic==1.0.0",
|
||||
"langchain-ollama==1.0.0",
|
||||
"langchain-chroma==1.0.0",
|
||||
"langchain-text-splitters==1.0.0",
|
||||
"chromadb==1.3.5",
|
||||
"unstructured==0.18.21",
|
||||
"pypdf==6.4.0",
|
||||
"python-docx==1.2.0",
|
||||
"docx2txt==0.8",
|
||||
"openpyxl==3.1.5",
|
||||
"pandas==2.3.3",
|
||||
"numpy==2.2.6",
|
||||
"matplotlib==3.10.7",
|
||||
"pillow==12.0.0",
|
||||
"beautifulsoup4==4.14.3",
|
||||
"ddgs==9.9.3",
|
||||
"httpx==0.28.1",
|
||||
"python-dateutil==2.9.0.post0",
|
||||
"pytz==2025.2",
|
||||
]
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"parameterized==0.9.0",
|
||||
"black==25.11.0",
|
||||
]
|
||||
|
||||
[tool.uv]
|
||||
package = false
|
||||
Reference in New Issue
Block a user