# Copyright (c) 2026 CueCrux Ltd. # Licensed under the Apache License, Version 2.0. services: crux: image: cuecrux/crux-daemon:latest build: . # `unless-stopped` lets the in-console "Restart daemon" button work — the # process exits cleanly via POST /v1/admin/restart and Docker brings it # back up. Manual `docker compose stop` still wins (won't auto-restart). restart: unless-stopped ports: - "127.0.0.1:14800:14800" - "127.0.0.1:14801:14801" volumes: - crux-data:/data healthcheck: test: ["CMD", "curl", "-f", "http://localhost:14800/readyz"] interval: 10s timeout: 5s retries: 3 deploy: resources: limits: memory: 4G environment: - CORECRUXD_DATA_DIR=/data - CORECRUXD_AUTH_MODE=dev_scopes - CORECRUXD_ROUTE_AUTH=enforce - CORECRUXD_ALLOW_INSECURE_DEV_AUTH_BIND=1 - CORECRUXD_HTTP_HOST=0.0.0.0 - CORECRUXD_GRPC_HOST=0.0.0.0 - CORECRUXD_MCP_HOST=0.0.0.0 - CORECRUXD_MCP_PORT=14801 - CORECRUXD_BUILD_CCXI=1 - CORECRUX_LOG_FORMAT=json # Embedding endpoint — set via env or uncomment for Ollama sidecar. - CORECRUXD_EMBEDDING_URL=${CORECRUXD_EMBEDDING_URL:-} - CORECRUXD_EMBEDDING_MODEL=${CORECRUXD_EMBEDDING_MODEL:-nomic-embed-text} # Phase 2 M5f.2 — archive observation sessions whose newest record is # older than this many days. Default unset = retain forever. - CORECRUXD_OBS_RETENTION_DAYS=${CORECRUXD_OBS_RETENTION_DAYS:-} # ── Optional: local Ollama for embeddings ────────────────────── # Start with: docker compose --profile embeddings up -d ollama: image: ollama/ollama:latest profiles: ["embeddings"] ports: - "127.0.0.1:11434:11434" volumes: - ollama-models:/root/.ollama # Pull the embedding model on first start. # Remove or change this if you use a different model. entrypoint: ["/bin/sh", "-c", "ollama serve & sleep 3 && ollama pull ${CORECRUXD_EMBEDDING_MODEL:-nomic-embed-text} && wait"] volumes: crux-data: ollama-models: