This directory contains the Docker Compose configuration for running the complete MUCGPT stack locally.
π For complete project documentation, see the main README and development guide.
Prerequisites:
keycloak entry in your hosts file (see RefArch-Docs)Steps:
Copy and configure the config files:
cp .env.example .env
cp core.config.yaml.example core.config.yaml
cp assistant.config.yaml.example assistant.config.yaml
# Edit core.config.yaml with your LLM model settings
# Edit assistant.config.yaml if you need non-default DB/LDAP settings
# Edit .env for proxy/SSL settings (if needed)
Start the stack:
podman compose up -d
Access the services:
mucgpt-user, password: mucgpt)βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β External Access β
β (localhost ports) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β β
:8083 (Gateway) :5432 (DB) :5050 (pgAdmin) :8100 (Keycloak)
β β β β
ββββββββββΌβββββββββββββββββΌβββββββββββββββΌβββββββββββββββΌββββββββββββββ
β Internal Network β
β β
β ββββββββββββββββ βββββββββββββββββββββββββββββββββββ β
β β Gateway βββββββββββ€ Authentication Layer β β
β β refarch- β β ββββββββββββ βββββββββββββββ β β
β β gateway β β β Keycloak β β init- β β β
β β :8080 β β β :8100 β β keycloak β β β
β ββββββββ¬ββββββββ β ββββββββββββ βββββββββββββββ β β
β β βββββββββββββββββββββββββββββββββββ β
β β β
β ββββββΌββββββββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββ β
β β β β β β β
β βΌ βΌ βΌ βΌ βΌ β
β ββββββββββββ ββββββββββββββββββββ ββββββββββββββ βββββββββ
β β Frontend β β Application β β Database β β MCP ββ
β β :8080 β β Services β β Layer β βServerββ
β ββββββββββββ β β β β βββββββββ
β β ββββββββββββββ β β ββββββββββ β :8088 β
β β β core- β β β βPostgresβ β β
β β β service β β β β:5432 β β β
β β β :8000 β β β ββββββββββ β β
β β ββββββββ¬ββββββ β β β β
β β β β β ββββββββββ β β
β β ββββββββΌββββββ β β βpgAdmin β β β
β β β xberg - β β β |:5050 β β β
β β β full :8000 β β β ββββββββββ β β
β β ββββββββββββββ β β β β
β β β β ββββββββββ β β
β β ββββββββββββββ β β βValkey β β β
β β β assistant- β β β β:6379 β β β
β β β service β β β ββββββββββ β β
β β β :8084 β β β β β
β β ββββββββββββββ β ββββββββββββββ β
β β β β
β β ββββββββββββββ β β
β β β assistant- β β β
β β β migrations β β β
β β ββββββββββββββ β β
β ββββββββββββββββββββ β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Service | Port | Description |
|---|---|---|
| postgres | 5432 | PostgreSQL 17.4 database |
| pg-admin | 5050 | Database administration UI |
| keycloak | 8100 | Identity and access management |
| valkey | 6379 | In-memory data store (Redis-compatible) |
| refarch-gateway | 8083 | API Gateway with OAuth2/OIDC |
| xberg-full | 8086 | Document extraction service |
| Service | Port (Internal) | Port (External) | Description |
|---|---|---|---|
| core-service | 8000 | 39146 | Core AI/LLM service backend |
| assistant-service | 8084 | 39147 | Assistant management service |
| assistant-migrations | - | - | Database migration service (run-once) |
| frontend | 8080 | 8081 | Web UI |
| Service | Port | Description |
|---|---|---|
| mcpdoc-server | 8088 | Model Context Protocol server for documentation |
The mcpdoc-server image installs mcpdoc through the local mcpdoc-server/pyproject.toml project. Pin or override transitive dependencies there, for example when an upstream mcp release is incompatible with mcpdoc.
# Start all services
podman compose up -d
# Stop all services
podman compose down
# View logs
podman compose logs -f [service-name]
# Rebuild specific service
podman compose up -d --build <service-name>
For local development with services running outside Docker:
# Start stack with development overrides
podman compose -f docker-compose.yml -f docker-compose.dev.yml up -d
See DEVELOPMENT.md for details on local development setup.
/api/sso/** β Keycloak/api/backend/** β Core service/api/assistant/** β Assistant service/** β Frontendinternal networkThe stack uses YAML configuration files as the primary configuration source, with environment variables available as overrides. Each service has its own config.yaml mounted into the container.
| File | Mounted to | Used by | Purpose |
|---|---|---|---|
core.config.yaml |
/app/config.yaml |
core-service | Models, Langfuse prompts, MCP, Redis, SSO |
assistant.config.yaml |
/app/config.yaml |
assistant-service, assistant-migrations | Database, Redis, LDAP, SSO |
.env |
env vars | all services | Proxies, SSL, infrastructure overrides |
Copy the example files:
cp .env.example .env
cp core.config.yaml.example core.config.yaml
cp assistant.config.yaml.example assistant.config.yaml
Edit core.config.yaml β configure your LLM models and optional features:
MODELS:
- type: "OPENAI"
llm_name: "gpt-4.1"
endpoint: "https://your-endpoint.example.com/v1"
api_key: "sk-..."
model_info:
auto_enrich_from_model_info_endpoint: true
internal_task_model_strength: "strong"
- type: "OPENAI"
llm_name: "gpt-4.1-nano"
endpoint: "https://your-endpoint.example.com/v1"
api_key: "sk-..."
model_info:
auto_enrich_from_model_info_endpoint: true
internal_task_model_strength: "weak"
REDIS:
HOST: "valkey"
PORT: 6379
LANGFUSE:
HOST: "https://your-langfuse-host.example.com"
PUBLIC_KEY: "pk-lf-..."
SECRET_KEY: "sk-lf-..."
MCP:
SOURCES:
"my-mcp-server":
url: "http://mcpdoc-server:8088/sse"
transport: "sse"
The core service supports an optional internal model hint for lightweight generation tasks.
Set this per model under MODELS[].model_info.internal_task_model_strength:
strong: preferred for assistant draft generationweak: preferred for chat title generationExample:
MODELS:
- type: "OPENAI"
llm_name: "gpt-4.1-mini"
endpoint: "https://your-endpoint.example.com/v1"
api_key: "sk-..."
model_info:
internal_task_model_strength: "strong"
- type: "OPENAI"
llm_name: "gpt-4.1-nano"
endpoint: "https://your-endpoint.example.com/v1"
api_key: "sk-..."
model_info:
internal_task_model_strength: "weak"
Selection behavior:
strongweakMODELS is used as a fallbackThis setting is internal to the core service and is not exposed to the frontend config API.
The optional PROMPTS section in core.config.yaml maps core-service prompt names to Langfuse folders and labels. Configure a mapping only when the matching prompt exists in Langfuse. The full commented example is in core.config.yaml.example.
defaults/default_instructions provides general chat instructions.generation_prompts/chat_title generates conversation titles.generation_prompts/assistant_name, assistant_description, and assistant_systemprompt generate the corresponding assistant draft fields.compliance_prompts/* classifies assistant prompts for high-risk use cases in migration/asylum/border control, public services, employment, and education.Edit assistant.config.yaml β configure database and optional LDAP:
DB:
HOST: "postgres"
PORT: 5432
NAME: "postgres"
USER: "admin"
PASSWORD: "admin"
REDIS:
HOST: "valkey"
PORT: 6379
LDAP:
ENABLED: false
Edit .env for proxy/SSL settings (if needed).
Start the stack:
podman compose up -d
Any YAML setting can be overridden with environment variables. The services use nested delimiters (__) to map to YAML sections:
| Service | Env Prefix | Example |
|---|---|---|
| core-service | MUCGPT_CORE_ |
MUCGPT_CORE_REDIS__HOST=valkey |
| assistant-service | MUCGPT_ASSISTANT_ |
MUCGPT_ASSISTANT_DB__HOST=postgres |
| assistant-migrations | MUCGPT_ASSISTANT_ |
(same as assistant-service) |
Mapping rules:
MUCGPT_CORE_VERSION=1.0.0 β VERSION: "1.0.0"__: MUCGPT_ASSISTANT_DB__PASSWORD=secret β DB: { PASSWORD: "secret" }MUCGPT_CORE_REDIS__HOST=valkey β REDIS: { HOST: "valkey" }Examples β set via .env or container environment::
# Override assistant database password (nested under DB section)
MUCGPT_ASSISTANT_DB__PASSWORD=my-secure-password
# Override core Redis host (nested under REDIS section)
MUCGPT_CORE_REDIS__HOST=my-redis-host
# Override core Langfuse secret key (nested under LANGFUSE section)
MUCGPT_CORE_LANGFUSE__SECRET_KEY=sk-lf-...
Settings are loaded in this order (highest priority wins):
.env file, uses __ for nestingconfig.yaml mounted into each containerThis means environment variables always override YAML values, which is useful for injecting secrets in CI/CD without storing them in config files.
Health Checks: All services implement health checks with readiness probes ensuring proper startup order.
Volumes: