services: context-lens: build: . image: context-lens:local container_name: context-lens ports: - "4040:4040" - "4041:4041" environment: CONTEXT_LENS_NO_UPDATE_CHECK: "1" CONTEXT_LENS_BIND_HOST: "0.0.0.0" volumes: - ~/.context-lens:/root/.context-lens restart: unless-stopped healthcheck: test: ["CMD", "node", "-e", "fetch('http://localhost:4041/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"] interval: 10s timeout: 3s start_period: 10s retries: 3 # Split-container alternative: run proxy and analysis as separate services. # Set CONTEXT_LENS_INGEST_URL so the proxy POSTs captures to the analysis # server over the Docker network instead of writing to a shared volume. # # proxy: # build: . # image: context-lens:local # command: ["node", "dist/proxy/server.js"] # ports: # - "4040:4040" # environment: # CONTEXT_LENS_NO_UPDATE_CHECK: "1" # CONTEXT_LENS_BIND_HOST: "0.0.0.0" # CONTEXT_LENS_INGEST_URL: "http://analysis:4041/api/ingest" # # analysis: # build: . # image: context-lens:local # command: ["node", "dist/analysis/server.js"] # ports: # - "4041:4041" # volumes: # - ~/.context-lens:/root/.context-lens