Catalyst / admin/Syanpse-Vanguard 14.8 GB / 57.8 GB 40.0 GB free
Help Sign in

admin / Syanpse-Vanguard

public
Code Issues Pull requests Pipelines Packages Security Insights Wiki Settings
Syanpse-Vanguard / synapse-vanguard-v3 / docker-compose.yml 2580 B · main
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Synapse-Vanguard — Milestones 1-3 (storage, ingest+normalizer, query API + web UI).
#
# DEFAULT = consolidated single process (embedded DuckDB is single-writer, so the
# API, agent-ingest, and normalizer MUST share one process / one DB connection).
# Web UI + API + agent ingest are all served on port 5500.
#
# Scale-out (separate microservice containers) becomes valid once you move to an
# external shared DB (SV_STORAGE_BACKEND=clickhouse) — a later milestone.
#
# NOTE: project name is pinned to "synapse-vanguard" so this v2 stack REUSES the
# v1 data volume (synapse-vanguard_sv-data). That preserves the agent registry,
# so already-enrolled agents keep shipping without re-enrolment. For a clean,
# separate v2 database instead, delete this `name:` line (or run with `-p`).
name: synapse-vanguard

x-common-env: &common-env
  SV_LOG_LEVEL: "INFO"
  SV_VAULT_KEY: "${SV_VAULT_KEY:?generate with: openssl rand -hex 32}"
  SV_JWT_SECRET: "${SV_JWT_SECRET:?set a long random string}"
  SV_STORAGE_BACKEND: "duckdb"
  SV_DUCKDB_PATH: "/var/lib/synapse-vanguard/vanguard.duckdb"
  SV_COLD_DIR: "/var/lib/synapse-vanguard/cold"
  SV_BROKER: "redis"
  SV_REDIS_URL: "redis://redis:6379/0"
  # Consolidated dev deployment serves ingest on the same plaintext port as the
  # UI, so agents authenticate by bearer token (mTLS is a hardened, separate
  # deployment — see README). Set true only when you split ingest onto its own
  # TLS-terminated port.
  SV_MTLS_ENABLED: "${SV_MTLS_ENABLED:-false}"
  SV_ENROLLMENT_TOKEN: "${SV_ENROLLMENT_TOKEN:?set an enrollment token}"
  SV_BOOTSTRAP_ADMIN_USER: "${SV_BOOTSTRAP_ADMIN_USER:-admin}"
  SV_BOOTSTRAP_ADMIN_PASSWORD: "${SV_BOOTSTRAP_ADMIN_PASSWORD:?set an admin password}"

services:
  vanguard:
    build: { context: ., dockerfile: docker/api.Dockerfile }
    environment: *common-env
    command: ["uvicorn", "sv.main:app", "--host", "0.0.0.0", "--port", "5500"]
    ports:
      - "5500:5500"          # web UI + API + agent ingest
    volumes: [ "sv-data:/var/lib/synapse-vanguard" ]
    depends_on:
      redis:
        condition: service_healthy
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "python", "-m", "sv.healthcheck"]
      interval: 30s
      timeout: 5s
      retries: 3

  redis:
    image: redis:7-alpine
    command: ["redis-server", "--save", "60", "1", "--appendonly", "yes"]
    volumes: [ "sv-redis:/data" ]
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 3s
      retries: 5

volumes:
  sv-data:
  sv-redis: