curated_compose/docker/signoz/compose.yaml

205 lines
7.6 KiB
YAML
Raw Normal View History

2026-06-16 11:20:25 -04:00
name: signoz
services:
2026-06-16 12:19:45 -04:00
# ===========================================================================
# ZooKeeper — required for ClickHouse coordination
# ===========================================================================
zookeeper:
image: signoz/zookeeper:${ZOOKEEPER_VERSION:-3.7.1}
restart: unless-stopped
user: root
environment:
ZOO_SERVER_ID: 1
ALLOW_ANONYMOUS_LOGIN: "yes"
ZOO_AUTOPURGE_INTERVAL: 1
ZOO_ENABLE_PROMETHEUS_METRICS: "yes"
ZOO_PROMETHEUS_METRICS_PORT_NUMBER: 9141
volumes:
- ./zookeeper-data:/bitnami/zookeeper
healthcheck:
test:
- CMD-SHELL
- curl -s -m 2 http://localhost:8080/commands/ruok | grep error | grep null
interval: 30s
timeout: 5s
retries: 3
networks:
- signoz
# ===========================================================================
# Init ClickHouse — installs histogramQuantile user script
# ===========================================================================
init-clickhouse:
image: clickhouse/clickhouse-server:${CLICKHOUSE_VERSION:-25.5}
restart: on-failure
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
echo "Done."
volumes:
- ./clickhouse/user_scripts:/var/lib/clickhouse/user_scripts
networks:
- signoz
2026-06-16 11:20:25 -04:00
# ===========================================================================
# ClickHouse — columnar storage for all telemetry data
# ===========================================================================
clickhouse:
image: clickhouse/clickhouse-server:${CLICKHOUSE_VERSION:-25.5}
restart: unless-stopped
2026-06-16 12:19:45 -04:00
tty: true
depends_on:
init-clickhouse:
condition: service_completed_successfully
zookeeper:
condition: service_healthy
2026-06-16 11:20:25 -04:00
environment:
2026-06-16 12:19:45 -04:00
CLICKHOUSE_SKIP_USER_SETUP: "1"
2026-06-16 11:20:25 -04:00
volumes:
2026-06-16 12:19:45 -04:00
- ./clickhouse/config.xml:/etc/clickhouse-server/config.xml:ro
- ./clickhouse/users.xml:/etc/clickhouse-server/users.xml:ro
- ./clickhouse/custom-function.xml:/etc/clickhouse-server/custom-function.xml:ro
- ./clickhouse/user_scripts:/var/lib/clickhouse/user_scripts:ro
- ./clickhouse/config.d/cluster.xml:/etc/clickhouse-server/config.d/cluster.xml:ro
2026-06-16 11:20:25 -04:00
- ./clickhouse-data:/var/lib/clickhouse
healthcheck:
2026-06-16 12:19:45 -04:00
test:
- CMD
- wget
- --spider
- -q
- 0.0.0.0:8123/ping
interval: 30s
timeout: 5s
retries: 3
ulimits:
nproc: 65535
nofile:
soft: 262144
hard: 262144
2026-06-16 11:20:25 -04:00
networks:
- signoz
# ===========================================================================
2026-06-16 12:19:45 -04:00
# SigNoz — query service + UI
2026-06-16 11:20:25 -04:00
# ===========================================================================
signoz:
2026-06-16 12:19:45 -04:00
image: signoz/signoz:${SIGNOZ_VERSION:-v0.128.0}
2026-06-16 11:20:25 -04:00
restart: unless-stopped
depends_on:
clickhouse:
condition: service_healthy
environment:
2026-06-16 12:19:45 -04:00
SIGNOZ_ALERTMANAGER_PROVIDER: signoz
SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://clickhouse:9000
SIGNOZ_SQLSTORE_SQLITE_PATH: /var/lib/signoz/signoz.db
SIGNOZ_TOKENIZER_JWT_SECRET: ${SIGNOZ_JWT_SECRET:-change-me-jwt-secret}
2026-06-16 11:20:25 -04:00
ports:
# SigNoz UI
2026-06-16 12:19:45 -04:00
- ${EXPOSE_SIGNOZ_UI_PORT:-8080}:8080
2026-06-16 11:20:25 -04:00
volumes:
- ./signoz-data:/var/lib/signoz
healthcheck:
test:
- CMD
- wget
- --spider
2026-06-16 12:19:45 -04:00
- -q
- localhost:8080/api/v1/health
interval: 30s
2026-06-16 11:20:25 -04:00
timeout: 5s
2026-06-16 12:19:45 -04:00
retries: 3
2026-06-16 11:20:25 -04:00
start_period: 30s
networks:
signoz: {}
pipeline:
aliases:
- signoz
- otel
- lgtm
# swag:
# aliases:
# - signoz
2026-06-16 12:19:45 -04:00
# ===========================================================================
# OTEL Collector — receives OTLP from all stacks
# ===========================================================================
otel-collector:
image: signoz/signoz-otel-collector:${OTELCOL_VERSION:-v0.144.5}
restart: unless-stopped
depends_on:
clickhouse:
condition: service_healthy
entrypoint:
- /bin/sh
command:
- -c
- |
/signoz-otel-collector migrate sync check &&
/signoz-otel-collector --config=/etc/otel-collector-config.yaml --manager-config=/etc/manager-config.yaml --copy-path=/var/tmp/collector-config.yaml
volumes:
- ./otel-collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml:ro
- ./otel-collector/manager-config.yaml:/etc/manager-config.yaml:ro
environment:
OTEL_RESOURCE_ATTRIBUTES: host.name=signoz-host,os.type=linux
LOW_CARDINAL_EXCEPTION_GROUPING: "false"
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
ports:
# OTLP gRPC receiver
- ${EXPOSE_OTLP_GRPC_PORT:-4317}:4317
# OTLP HTTP receiver
- ${EXPOSE_OTLP_HTTP_PORT:-4318}:4318
networks:
- signoz
- pipeline
# ===========================================================================
# Telemetry Store Migrator — runs ClickHouse migrations
# ===========================================================================
migrator:
image: signoz/signoz-otel-collector:${OTELCOL_VERSION:-v0.144.5}
restart: on-failure
depends_on:
clickhouse:
condition: service_healthy
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
networks:
- signoz
2026-06-16 11:20:25 -04:00
networks:
signoz:
name: signoz
driver: bridge
pipeline:
name: pipeline
external: true
# swag:
# name: swag
# external: true
volumes: {}