# Intelligence infrastructure for threads support. # # Starts postgres, redis, and the all-in-one intelligence composite # container (runs app-api, realtime-gateway, thread-culler, and the # db-migrations oneshot internally under s6-overlay). # # Usage: # docker compose up -d --wait # # Then start the app services on the host: # npm run dev name: langgraph-python-intelligence services: # --------------------------------------------------------------------------- # Infrastructure # --------------------------------------------------------------------------- postgres: image: postgres:16-alpine ports: - "${POSTGRES_HOST_PORT:-5432}:5432" environment: POSTGRES_USER: intelligence POSTGRES_PASSWORD: intelligence POSTGRES_DB: postgres volumes: - postgres-data:/var/lib/postgresql/data - ./docker/init-db:/docker-entrypoint-initdb.d:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U intelligence -d postgres"] interval: 5s timeout: 3s retries: 5 restart: unless-stopped networks: - intelligence redis: image: redis:7-alpine ports: - "${REDIS_HOST_PORT:-6379}:6379" volumes: - redis-data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 restart: unless-stopped networks: - intelligence # --------------------------------------------------------------------------- # Intelligence composite (app-api + realtime-gateway + thread-culler + # db-migrations, all in one container under s6-overlay) # --------------------------------------------------------------------------- intelligence: image: ghcr.io/copilotkit/intelligence/composite:0.1.0 ports: - "${APP_API_HOST_PORT:-4201}:4201" - "${REALTIME_GATEWAY_HOST_PORT:-4401}:4401" environment: DATABASE_URL: postgresql://intelligence:intelligence@postgres:5432/intelligence_app REDIS_URL: redis://redis:6379 AUTH_SECRET: local-dev-secret-must-be-at-least-32-chars RUNNER_AUTH_SECRET: dev-runner-secret SECRET_KEY_BASE: local-realtime-gateway-secret-key-base-at-least-64-bytes-long-for-dev DEFAULT_ORGANIZATION_ID: casa-de-erlang COPILOTKIT_LICENSE_TOKEN: "${COPILOTKIT_LICENSE_TOKEN:-}" THREAD_STALE_HOURS: "${THREAD_STALE_HOURS:-3}" THREAD_CULL_BATCH_SIZE: "${THREAD_CULL_BATCH_SIZE:-1000}" depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: unless-stopped networks: - intelligence volumes: postgres-data: redis-data: networks: intelligence: driver: bridge