Docker Compose: Make model endpoint URLs configurable via env vars
Parent: #758 (closed)
Summary
Switch ALL hardcoded Docker service names in docker-compose.yaml environment sections to ${VAR:-default} patterns. This covers both OPEA/AI services AND core services (ArangoDB, Backend, Doc-repo, Redis, Keycloak).
This issue covers the docker-compose.yaml environment sections only. Separate issues cover:
- Kong config: #766
- ChatQnA Python code: #759 (closed)
- Docling microservice: #764 (closed)
Services to Update
OPEA/AI Services
ChatQnA — add _URL env var passthrough:
chatqna-xeon-backend-server:
environment:
LLM_SERVER_URL: ${LLM_SERVER_URL:-}
LLM_SERVER_HOST_IP: ${LLM_SERVER_HOST_IP:-vllm}
LLM_SERVER_PORT: ${LLM_SERVER_PORT:-8000}
# ... same for EMBEDDING, RETRIEVER, RERANK, TRANSLATION, GUARDRAIL
Dataprep — configurable model + core endpoints:
dataprep-arango-service:
environment:
VLLM_ENDPOINT: ${VLLM_ENDPOINT:-http://vllm:8000}
TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT:-http://tei:80}
GUARDRAIL_URL: ${GUARDRAIL_URL:-http://guardrail:9090/v1/guardrails}
DOCLING_ENDPOINT: ${DOCLING_ENDPOINT:-}
Retriever:
retriever-arango-service:
environment:
VLLM_ENDPOINT: ${VLLM_ENDPOINT:-http://vllm:8000}
TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT:-http://tei:80}
Microservice wrappers:
embedding:
environment:
TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT:-http://tei:80}
reranker:
environment:
TEI_RERANKING_ENDPOINT: ${TEI_RERANKING_ENDPOINT:-http://tei_reranker:80}
translation:
environment:
LLM_ENDPOINT: ${VLLM_TRANSLATION_ENDPOINT:-http://vllm-translation-guardrail:9031}
Core Services (see #765 for details)
ArangoDB URL (5 references):
- ARANGO_URL=${ARANGO_URL:-http://arango-vector-db:8529}
Backend URL (2 references in OPEA services):
BACKEND_SERVICE_URL: ${BACKEND_SERVICE_URL:-http://backend:3000}
Document Repository URL (2 references):
DOCUMENT_REPOSITORY_URL: ${DOCUMENT_REPOSITORY_URL:-http://document-repository:3001}
DOC_REPO_URL: ${DOC_REPO_URL:-http://document-repository:3001}
Keycloak Internal URL (keycloak-config):
- KEYCLOAK_URL=${KEYCLOAK_INTERNAL_URL:-http://keycloak:8080}
Redis (already uses env var):
- TRANSLATION_CACHE_HOST=${TRANSLATION_CACHE_HOST:-redis-cache}
Acceptance Criteria
-
All model endpoint env vars use ${VAR:-default}pattern -
All core service URL env vars use ${VAR:-default}pattern -
DOCLING_ENDPOINTadded to dataprep environment -
Defaults preserve current Docker DNS names (no behavior change) -
docker compose configvalidates without errors
Edited by david-full