admin / SAynapse-Horizon
publicSelf Hosted Cyber Threat Intelligence Hub
SAynapse-Horizon / Synapse-Horizon-v2 / docker-compose.yml
1913 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 66 67 68 | # Synapse-Horizon v2 — Cyber Threat Intelligence dashboard # # Production: docker compose up -d --build → http://localhost:8081 # Development: docker compose --profile dev up → http://localhost:5191 # # Host ports are offset from v1 (8081 / 4001 / 5191) so both versions can run # side by side. Live-source credentials are read from a local `.env` file. services: # Ingestion backend — fetches, authenticates and normalizes live CTI feeds. api: build: context: ./backend dockerfile: Dockerfile image: synapse-horizon-v2-api:latest container_name: synapse-horizon-v2-api env_file: - .env environment: PORT: "4000" expose: - "4000" ports: - "4001:4000" # exposed for direct API inspection; remove to keep internal-only restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:4000/api/health"] interval: 30s timeout: 4s retries: 3 start_period: 8s # Frontend — nginx serves the built SPA and proxies /api → api:4000. horizon: build: context: . dockerfile: Dockerfile image: synapse-horizon-v2:latest container_name: synapse-horizon-v2 depends_on: - api ports: - "8081:80" restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost/"] interval: 30s timeout: 3s retries: 3 start_period: 5s # Optional hot-reloading dev frontend (Vite). Proxies /api → api:4000. horizon-dev: profiles: ["dev"] image: node:20-alpine container_name: synapse-horizon-v2-dev working_dir: /app command: sh -c "npm install && npm run dev" environment: VITE_API_TARGET: "http://api:4000" depends_on: - api ports: - "5191:5191" volumes: - ./:/app - /app/node_modules restart: unless-stopped |