#!/usr/bin/env bash # Whole-library capture entry point for the local WKNFull test stack. # # Every service of the Compose project is declared below: exactly one writer # (app) and a reason for each sibling which must NOT be stopped. ProjectController # refuses to run if the project gains a service that is not declared here, so a # new container cannot be silently left outside the maintenance window. # # Credentials are read from the running containers at call time and are never # printed. Nothing here writes to the source stack except SIGTERM/SIGSTART of the # declared writer. set -euo pipefail ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) BIN="${LIBRARYCTL_BIN:-$ROOT/libraryctl}" if [ ! -x "$BIN" ]; then echo "LIBRARYCTL_MISSING: build it with 'go build -o libraryctl ./cmd/libraryctl'" >&2 exit 1 fi # Reasons must not contain commas: the flag is comma-separated. NON_WRITERS="frontend=UI only; no knowledge writes" NON_WRITERS+=",mcp=read-only MCP server" NON_WRITERS+=",dobotai-target=alpine placeholder; no knowledge writes" NON_WRITERS+=",docreader=parse RPC service; app persists parse output and settlement requires zero pending ops" NON_WRITERS+=",elasticsearch=search store; not an initiator" NON_WRITERS+=",postgres=database store; not an initiator" NON_WRITERS+=",redis=queue/cache store; not an initiator" NON_WRITERS+=",neo4j=graph store; not an initiator" NON_WRITERS+=",langfuse-web=LLM observability UI" NON_WRITERS+=",langfuse-worker=LLM observability worker; own storage" NON_WRITERS+=",langfuse-clickhouse=observability store" NON_WRITERS+=",langfuse-minio=observability object store" NON_WRITERS+=",langfuse-db-init=one-shot init; exited" NON_WRITERS+=",searxng=read-only search proxy" NON_WRITERS+=",searxng-init=one-shot init; exited" exec "$BIN" "$@" \ -source-app WKNFull-app \ -source-pg WKNFull-postgres \ -source-es WKNFull-elasticsearch \ -governance-pg knowledge-governance-p1-postgres-1 \ -project weknora071full \ -writers app \ -non-writers "$NON_WRITERS"