Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

3.0 KB
Raw Blame
services:
  init-clickhouse:
    image: clickhouse/clickhouse-server:25.12.5
    container_name: init-clickhouse
    command:
      - bash
      - -c
      - |
        version="v0.0.1"
        node_os=$$(uname -s | tr '[:upper:]' '[:lower:]')
        node_arch=$$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)
        echo "Fetching histogram-binary for $${node_os}/$${node_arch}"
        cd /tmp
        wget -O histogram-quantile.tar.gz "https://github.com/SigNoz/signoz/releases/download/histogram-quantile%2F$${version}/histogram-quantile_$${node_os}_$${node_arch}.tar.gz"
        tar -xvzf histogram-quantile.tar.gz
        mv histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile
    restart: on-failure
    volumes:
      - ${PWD}/fs/tmp/var/lib/clickhouse/user_scripts/:/var/lib/clickhouse/user_scripts/
  clickhouse:
    image: clickhouse/clickhouse-server:25.12.5
    container_name: clickhouse
    volumes:
      - ${PWD}/fs/etc/clickhouse-server/config.d/config.xml:/etc/clickhouse-server/config.d/config.xml
      - ${PWD}/fs/etc/clickhouse-server/users.d/users.xml:/etc/clickhouse-server/users.d/users.xml
      - ${PWD}/fs/tmp/var/lib/clickhouse/:/var/lib/clickhouse/
      - ${PWD}/fs/tmp/var/lib/clickhouse/user_scripts/:/var/lib/clickhouse/user_scripts/
      - ${PWD}/../../../deploy/common/clickhouse/custom-function.xml:/etc/clickhouse-server/custom-function.xml
    ports:
      - "127.0.0.1:8123:8123"
      - "127.0.0.1:9000:9000"
    tty: true
    healthcheck:
      test:
        - CMD
        - wget
        - --spider
        - -q
        - 0.0.0.0:8123/ping
      interval: 30s
      timeout: 5s
      retries: 3
    depends_on:
      init-clickhouse:
        condition: service_completed_successfully
      zookeeper:
        condition: service_healthy
    environment:
      - CLICKHOUSE_SKIP_USER_SETUP=1
    networks:
      - default
      - signoz-devenv
  zookeeper:
    image: signoz/zookeeper:3.7.1
    container_name: zookeeper
    volumes:
      - ${PWD}/fs/tmp/zookeeper:/bitnami/zookeeper
    ports:
      - "127.0.0.1:2181:2181"
    environment:
      - ALLOW_ANONYMOUS_LOGIN=yes
    healthcheck:
      test:
        - CMD-SHELL
        - curl -s -m 2 http://localhost:8080/commands/ruok | grep error | grep null
      interval: 30s
      timeout: 5s
      retries: 3
  telemetrystore-migrator:
    image: signoz/signoz-otel-collector:v0.144.6
    container_name: telemetrystore-migrator
    environment:
      - SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://clickhouse:9000
      - SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER=cluster
      - SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_REPLICATION=true
      - SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
    entrypoint:
      - /bin/sh
    command:
      - -c
      - |
        /signoz-otel-collector migrate bootstrap &&
        /signoz-otel-collector migrate sync up &&
        /signoz-otel-collector migrate async up
    depends_on:
      clickhouse:
        condition: service_healthy
    restart: on-failure
    networks:
      - default
      - signoz-devenv

networks:
  signoz-devenv:
    name: signoz-devenv