# Chat Backend Django + Channels API for AIML Operations chat (`llm_be/`). ## Local (uv) ```bash cp .env.example .env uv sync cd llm_be uv run python manage.py migrate uv run python manage.py runserver 0.0.0.0:8003 ``` ## Docker (dev compose = bundled Postgres) ```bash docker compose up --build ``` Prod compose (`docker-compose.prod.yml`) expects external `DATABASE_URL` and `WEB_PORT` from server-infra secrets. See `.env.prod.example`. ## Ollama Set `OLLAMA_BASE_URL` (default `http://127.0.0.1:11434` locally). Deployed envs use the GPU host: `http://10.0.0.128:11434`. ## File storage Prompt attachments and documents are stored in Postgres (`StoredFile` / `DatabaseStorage`), not on the container filesystem. ## Deploy Gitea Actions on `master` → `server-infra/scripts/deploy.sh --app chat_backend --env prod`. Related: [chat_backend#6](https://git.aimloperations.com/ai_ml_operations/chat_backend/issues/6)