mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-03 22:13:01 +00:00
- CI installs the backend requirements from docsgpt/; the old cd into
application/ silently installed nothing.
- The root .dockerignore re-admits only application/__init__.py. An upgraded
checkout may still hold gitignored application/{inputs,indexes,vectors,.env}
from the old layout, and the directory rule shipped them into the image.
- The compose files keep the host bind mounts on application/{indexes,inputs,
vectors}, so an upgrade does not start with empty data. The move comes with
the packaging work, together with an upgrade note.
- The alias loader puts the real docsgpt spec back on the shared module object
after import (the import machinery stamped the alias spec on it, which made
importlib.reload rename the module and skip re-execution) and delegates
get_code/get_source/get_filename to the target loader, so
python -m application.<name> runs.
- Each legacy application.* task name is registered as its own task object,
a subclass carrying the old name. Registering the same object under two
keys made Celery's tracer log every run under whichever name it built last.
- The redbeat key prefix stays redbeat:docsgpt:; the three schedule_syncs
entries get stable names instead. redbeat tracks its static entries and
deletes the ones that vanish from beat_schedule at start-up, and rewrites the
task path of named entries in place, so neither a prefix bump nor a cleanup
pass is needed (checked against redbeat 2.4.2 with a seeded Redis).
134 lines
4.7 KiB
YAML
134 lines
4.7 KiB
YAML
name: docsgpt-oss
|
|
services:
|
|
frontend:
|
|
build:
|
|
context: ../frontend
|
|
# Vite dev server with hot reload over the bind mount below. The default
|
|
# target (what Docker Hub publishes) is a static build behind nginx.
|
|
target: dev
|
|
volumes:
|
|
- ../frontend/src:/app/src
|
|
environment:
|
|
# Every VITE_* the app reads. A bare name is passed through only when it is
|
|
# set in the shell or the --env-file, so an unset one does not reach the
|
|
# container as an empty string and override the image's own default.
|
|
- VITE_API_HOST=http://localhost:7091
|
|
- VITE_API_STREAMING=${VITE_API_STREAMING:-true}
|
|
- VITE_BASE_URL
|
|
- VITE_GOOGLE_CLIENT_ID
|
|
- VITE_GOOGLE_PICKER_API_KEY
|
|
- VITE_SHARE_POINT_CLIENT_ID
|
|
- VITE_CONFLUENCE_CLIENT_ID
|
|
- VITE_NOTIFICATION_TEXT
|
|
- VITE_NOTIFICATION_LINK
|
|
- VITE_ENABLE_VOICE_INPUT
|
|
- VITE_DISABLE_SOURCE_FE
|
|
- VITE_USE_V
|
|
ports:
|
|
- "5173:5173"
|
|
depends_on:
|
|
- backend
|
|
|
|
backend:
|
|
user: root
|
|
build:
|
|
context: ..
|
|
dockerfile: docsgpt/Dockerfile
|
|
args:
|
|
# Optional extras to bake in (comma-separated): docling, milvus. The
|
|
# docling extra brings the layout-model parser/OCR backend and its
|
|
# models. INSTALL_DOCLING=true is the older spelling of EXTRAS=docling.
|
|
EXTRAS: ${EXTRAS:-}
|
|
INSTALL_DOCLING: ${INSTALL_DOCLING:-false}
|
|
# Bake the tesseract binary behind OCR_ENABLED=true (~35 MB): set
|
|
# INSTALL_TESSERACT=true in ../.env or the shell (setup.sh does this
|
|
# when OCR is enabled). Off by default, like docling. Upgrading a
|
|
# deployment that already runs OCR_ENABLED=true with tesseract: add
|
|
# INSTALL_TESSERACT=true to ../.env before rebuilding, or scanned
|
|
# pages fail with an install hint.
|
|
INSTALL_TESSERACT: ${INSTALL_TESSERACT:-false}
|
|
env_file:
|
|
- ../.env
|
|
environment:
|
|
# Override URLs to use docker service names
|
|
- CELERY_BROKER_URL=redis://redis:6379/0
|
|
- CELERY_RESULT_BACKEND=redis://redis:6379/1
|
|
- CACHE_REDIS_URL=redis://redis:6379/2
|
|
- POSTGRES_URI=postgresql://docsgpt:docsgpt@postgres:5432/docsgpt
|
|
ports:
|
|
- "7091:7091"
|
|
volumes:
|
|
# Host data stays under application/ (the old package directory) for this
|
|
# release so an upgraded checkout keeps its indexes; it moves with the
|
|
# packaging work, together with an upgrade note.
|
|
- ../application/indexes:/app/indexes
|
|
- ../application/inputs:/app/inputs
|
|
- ../application/vectors:/app/vectors
|
|
depends_on:
|
|
redis:
|
|
condition: service_started
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
worker:
|
|
user: root
|
|
build:
|
|
context: ..
|
|
dockerfile: docsgpt/Dockerfile
|
|
args:
|
|
EXTRAS: ${EXTRAS:-}
|
|
INSTALL_DOCLING: ${INSTALL_DOCLING:-false}
|
|
INSTALL_TESSERACT: ${INSTALL_TESSERACT:-false}
|
|
# Consumes the default queue AND the dedicated `parsing` (read_document /
|
|
# parse_document) and `embeddings` (query embedding) queues. Without `parsing`
|
|
# the read_document await never resolves; without `embeddings` every search
|
|
# fails after EMBEDDINGS_DELEGATE_TIMEOUT, because EMBEDDINGS_DELEGATE_TO_WORKER
|
|
# is on by default. For heavy/OCR parsing run a separate worker with `-Q parsing`;
|
|
# to keep query latency off the ingest pool, another with `-Q embeddings`.
|
|
command: celery -A docsgpt.app.celery worker -l INFO -B -Q docsgpt,parsing,embeddings
|
|
env_file:
|
|
- ../.env
|
|
environment:
|
|
# Override URLs to use docker service names
|
|
- CELERY_BROKER_URL=redis://redis:6379/0
|
|
- CELERY_RESULT_BACKEND=redis://redis:6379/1
|
|
- API_URL=http://backend:7091
|
|
- CACHE_REDIS_URL=redis://redis:6379/2
|
|
- POSTGRES_URI=postgresql://docsgpt:docsgpt@postgres:5432/docsgpt
|
|
volumes:
|
|
# Host data stays under application/ (the old package directory) for this
|
|
# release so an upgraded checkout keeps its indexes; it moves with the
|
|
# packaging work, together with an upgrade note.
|
|
- ../application/indexes:/app/indexes
|
|
- ../application/inputs:/app/inputs
|
|
- ../application/vectors:/app/vectors
|
|
depends_on:
|
|
redis:
|
|
condition: service_started
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
redis:
|
|
image: redis:6-alpine
|
|
ports:
|
|
- 6379:6379
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
- POSTGRES_USER=docsgpt
|
|
- POSTGRES_PASSWORD=docsgpt
|
|
- POSTGRES_DB=docsgpt
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U docsgpt -d docsgpt"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
volumes:
|
|
postgres_data:
|