Docker-based infrastructure for the MONITOR system.
This directory contains the Docker Compose configuration for running the complete MONITOR database stack:
- Neo4j - Canonical graph database (truth layer)
- MongoDB - Narrative documents and proposals
- Qdrant - Vector database for semantic search
- MinIO - Binary object storage (PDFs, images)
- OpenSearch - Full-text search (optional)
# From the repo root:
cp env.example .env
# From this infra/ directory:
cp .env.example .envEdit each .env with your passwords and configuration.
docker compose up -ddocker compose psAll services should show Up status.
-
Neo4j Browser: http://localhost:7474
- Username:
neo4j - Password:
<your NEO4J_PASSWORD from .env>
- Username:
-
MinIO Console: http://localhost:9001
- Username:
monitor - Password:
<your MINIO_PASSWORD from .env>
- Username:
-
OpenSearch Dashboards: http://localhost:5601
- Username:
admin - Password:
<your OPENSEARCH_PASSWORD from .env>
- Username:
Ports:
7474: HTTP (Browser UI)7687: Bolt (Database connection)
Volumes:
./neo4j/data: Database files./neo4j/logs: Log files./neo4j/import: CSV import directory./neo4j/plugins: APOC and GDS plugins
Configuration:
- Heap: 512MB initial, 2GB max
- Page cache: 1GB
- Plugins: APOC, Graph Data Science
Connection String:
bolt://localhost:7687
Ports:
27017: MongoDB server
Volumes:
./mongodb/data: Database files./mongodb/configdb: Configuration./mongodb/init: Initialization scripts
Connection String:
mongodb://monitor:<password>@localhost:27017/monitor
Collections:
scenes- Narrative scenesturns- Turn-by-turn logsproposed_changes- Canonization stagingresolutions- Dice/rules outcomescharacter_memories- NPC/PC memoriesdocuments- Ingested source documentssnippets- Document chunkscharacter_sheets- Character sheets
Ports:
6333: REST API6334: gRPC
Volumes:
./qdrant/storage: Vector indices
REST API:
http://localhost:6333
Collections (created lazily by the data-layer on first use; see
packages/data-layer/src/monitor_data/db/qdrant.py:COLLECTION_CONFIGS):
scenes- Scene summaries and turn embeddingsmemories- Character memory embeddingssnippets- Document snippet embeddingsentities- Entity embeddingsknowledge- Knowledge-pack embeddings
Ports:
9000: S3-compatible API9001: Web Console
Volumes:
./minio/data: Object storage
Default Bucket:
monitor- All uploads land here (created lazily byMinIOClient.ensure_bucket()on first upload).
S3 Endpoint:
http://localhost:9000
Ports:
9200: REST API9600: Performance Analyzer5601: Dashboards UI
Volumes:
./opensearch/data: Index data
REST API:
https://localhost:9200
Indices:
monitor-scenes- Scene full-text searchmonitor-facts- Fact full-text searchmonitor-snippets- Document snippet search
Schema bootstrap is automatic on first DB connect — no manual Cypher,
MongoDB init scripts, Qdrant REST calls, or MinIO bucket creation is
required. After make infra-up (or docker compose up -d), run:
# From the repo root
uv run python -m monitor_cli.main initThe wizard prompts for an LLM provider, writes API keys to .env.tokens
(mode 0o600), seeds the llm_providers Postgres table with the right
role defaults, and prints a green/red health panel at the end. To verify
afterwards:
uv run python -m monitor_cli.main doctor --jsonSee the top-level README.md for the full walkthrough.
docker compose exec neo4j neo4j-admin database dump neo4j --to-path=/var/lib/neo4j/data/dumpsdocker compose exec mongodb mongodump --uri="mongodb://monitor:<password>@localhost:27017/monitor" --out=/data/backupdocker compose exec qdrant tar -czf /qdrant/storage/backup.tar.gz /qdrant/storagedocker compose exec neo4j neo4j-admin database load neo4j --from-path=/var/lib/neo4j/data/dumpsdocker compose exec mongodb mongorestore --uri="mongodb://monitor:<password>@localhost:27017/monitor" /data/backup# Neo4j
curl http://localhost:7474/
# MongoDB
docker compose exec mongodb mongosh --eval "db.adminCommand('ping')"
# Qdrant
curl http://localhost:6333/healthz
# MinIO
curl http://localhost:9000/minio/health/live
# OpenSearch
curl -k https://localhost:9200/_cluster/health# All services
docker compose logs -f
# Specific service
docker compose logs -f neo4j
docker compose logs -f mongodb
docker compose logs -f qdrantdocker compose statsCheck logs:
docker compose logs neo4jCommon issues:
- APOC plugin mismatch → ensure plugin version matches Neo4j version
- Memory limits → increase heap/pagecache in .env
Check authentication:
docker compose exec mongodb mongosh -u monitor -p <password>List collections:
curl http://localhost:6333/collectionsCreate if missing (see Initialization section above).
Check credentials in .env match what you're using.
Reset admin password:
docker compose down
rm -rf ./minio/data
docker compose up -d minioEdit docker-compose.yml:
environment:
- NEO4J_dbms_memory_heap_initial__size=1G
- NEO4J_dbms_memory_heap_max__size=4G
- NEO4J_dbms_memory_pagecache_size=2GAdd to docker-compose.yml:
command: --wiredTigerCacheSizeGB=2For large datasets, tune HNSW parameters:
curl -X PATCH 'http://localhost:6333/collections/scenes' \
-H 'Content-Type: application/json' \
-d '{
"hnsw_config": {
"m": 32,
"ef_construct": 200
}
}'- Change all default passwords in
.env - Enable TLS for all services
- Configure firewall rules (only expose necessary ports)
- Enable authentication on all services
- Set up backup rotation
- Configure log aggregation
- Enable audit logging
- Set up monitoring/alerting
- Review and harden Docker security settings
In production, use separate networks:
networks:
frontend:
internal: false
backend:
internal: trueOnly expose MCP server to frontend network.
- layer1_data.md - Data layer architecture and API specifications
- mcp_transport.md - MCP tool definitions
- Ontology - Data model specification