mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
241 lines
7.4 KiB
YAML
241 lines
7.4 KiB
YAML
# This is copied directly from https://github.com/SigNoz/signoz/blob/v0.71.0/deploy/docker/docker-compose.yaml
|
|
# Note that maintainer-interfaces uses version 0.71.*, so we copied from the same version here
|
|
#
|
|
# Since the real production signoz server only uses gRPC, we have changed the compose.yaml and the
|
|
# otel-collector-config.yaml to reflect that
|
|
|
|
version: "3"
|
|
x-common: &common
|
|
profiles:
|
|
- signoz
|
|
networks:
|
|
- signoz-net
|
|
restart: on-failure
|
|
logging:
|
|
options:
|
|
max-size: 50m
|
|
max-file: "3"
|
|
x-clickhouse-defaults: &clickhouse-defaults
|
|
!!merge <<: *common
|
|
# addding non LTS version due to this fix https://github.com/ClickHouse/ClickHouse/commit/32caf8716352f45c1b617274c7508c86b7d1afab
|
|
image: clickhouse/clickhouse-server:24.1.2-alpine
|
|
tty: true
|
|
labels:
|
|
signoz.io/scrape: "true"
|
|
signoz.io/port: "9363"
|
|
signoz.io/path: "/metrics"
|
|
depends_on:
|
|
init-clickhouse:
|
|
condition: service_completed_successfully
|
|
zookeeper-1:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
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
|
|
x-zookeeper-defaults: &zookeeper-defaults
|
|
!!merge <<: *common
|
|
image: bitnami/zookeeper:3.7.1
|
|
user: root
|
|
labels:
|
|
signoz.io/scrape: "true"
|
|
signoz.io/port: "9141"
|
|
signoz.io/path: "/metrics"
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- curl -s -m 2 http://localhost:8080/commands/ruok | grep error | grep null
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
x-db-depend: &db-depend
|
|
!!merge <<: *common
|
|
depends_on:
|
|
clickhouse:
|
|
condition: service_healthy
|
|
schema-migrator-sync:
|
|
condition: service_completed_successfully
|
|
services:
|
|
init-clickhouse:
|
|
!!merge <<: *common
|
|
image: clickhouse/clickhouse-server:24.1.2-alpine
|
|
container_name: signoz-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
|
|
volumes:
|
|
- ./config/clickhouse/user_scripts:/var/lib/clickhouse/user_scripts/
|
|
zookeeper-1:
|
|
!!merge <<: *zookeeper-defaults
|
|
container_name: signoz-zookeeper-1
|
|
# ports:
|
|
# - "2181:2181"
|
|
# - "2888:2888"
|
|
# - "3888:3888"
|
|
volumes:
|
|
- zookeeper-1:/bitnami/zookeeper
|
|
environment:
|
|
- ZOO_SERVER_ID=1
|
|
- ALLOW_ANONYMOUS_LOGIN=yes
|
|
- ZOO_AUTOPURGE_INTERVAL=1
|
|
- ZOO_ENABLE_PROMETHEUS_METRICS=yes
|
|
- ZOO_PROMETHEUS_METRICS_PORT_NUMBER=9141
|
|
clickhouse:
|
|
!!merge <<: *clickhouse-defaults
|
|
container_name: signoz-clickhouse
|
|
# ports:
|
|
# - "9000:9000"
|
|
# - "8123:8123"
|
|
# - "9181:9181"
|
|
volumes:
|
|
- ./config/clickhouse/config.xml:/etc/clickhouse-server/config.xml
|
|
- ./config/clickhouse/users.xml:/etc/clickhouse-server/users.xml
|
|
- ./config/clickhouse/custom-function.xml:/etc/clickhouse-server/custom-function.xml
|
|
- ./config/clickhouse/user_scripts:/var/lib/clickhouse/user_scripts/
|
|
- ./config/clickhouse/cluster.xml:/etc/clickhouse-server/config.d/cluster.xml
|
|
- clickhouse:/var/lib/clickhouse/
|
|
# - ./config/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml
|
|
alertmanager:
|
|
!!merge <<: *common
|
|
image: signoz/alertmanager:${ALERTMANAGER_TAG:-0.23.7}
|
|
container_name: signoz-alertmanager
|
|
command:
|
|
- --queryService.url=http://query-service:8085
|
|
- --storage.path=/data
|
|
volumes:
|
|
- alertmanager:/data
|
|
depends_on:
|
|
query-service:
|
|
condition: service_healthy
|
|
query-service:
|
|
!!merge <<: *db-depend
|
|
image: signoz/query-service:${DOCKER_TAG:-0.71.0}
|
|
container_name: signoz-query-service
|
|
command:
|
|
- --config=/root/config/prometheus.yml
|
|
- --use-logs-new-schema=true
|
|
- --use-trace-new-schema=true
|
|
# ports:
|
|
# - "3301:8080" # signoz port
|
|
# - "6060:6060" # pprof port
|
|
volumes:
|
|
- ./config/signoz/prometheus.yml:/root/config/prometheus.yml
|
|
- ./config/dashboards:/root/config/dashboards
|
|
- sqlite:/var/lib/signoz/
|
|
environment:
|
|
- ClickHouseUrl=tcp://clickhouse:9000
|
|
- ALERTMANAGER_API_PREFIX=http://alertmanager:9093/api/
|
|
- SIGNOZ_SQLSTORE_SQLITE_PATH=/var/lib/signoz/signoz.db
|
|
- DASHBOARDS_PATH=/root/config/dashboards
|
|
- STORAGE=clickhouse
|
|
- GODEBUG=netdns=go
|
|
- TELEMETRY_ENABLED=false
|
|
- DEPLOYMENT_TYPE=docker-standalone-amd
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- wget
|
|
- --spider
|
|
- -q
|
|
- localhost:8080/api/v1/health
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
frontend:
|
|
!!merge <<: *common
|
|
image: signoz/frontend:${DOCKER_TAG:-0.71.0}
|
|
container_name: signoz-frontend
|
|
depends_on:
|
|
- alertmanager
|
|
- query-service
|
|
ports:
|
|
- "127.0.0.1:3301:3301"
|
|
volumes:
|
|
- ./config/signoz/nginx-config.conf:/etc/nginx/conf.d/default.conf
|
|
otel-collector:
|
|
!!merge <<: *db-depend
|
|
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.111.26}
|
|
container_name: signoz-otel-collector
|
|
command:
|
|
- --config=/etc/otel-collector-config.yaml
|
|
- --manager-config=/etc/manager-config.yaml
|
|
- --copy-path=/var/tmp/collector-config.yaml
|
|
- --feature-gates=-pkg.translator.prometheus.NormalizeName
|
|
volumes:
|
|
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
|
|
- ./config/signoz/otel-collector-opamp-config.yaml:/etc/manager-config.yaml
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
environment:
|
|
- OTEL_RESOURCE_ATTRIBUTES=host.name=signoz-host,os.type=linux
|
|
- LOW_CARDINAL_EXCEPTION_GROUPING=false
|
|
ports:
|
|
# - "1777:1777" # pprof extension
|
|
- "127.0.0.1:4317:4317" # OTLP gRPC receiver
|
|
# - "2255:2255"
|
|
networks:
|
|
- signoz-net
|
|
- default # so CRS services can reach the otel-collector
|
|
depends_on:
|
|
query-service:
|
|
condition: service_healthy
|
|
logspout:
|
|
<<: *common
|
|
image: "gliderlabs/logspout:v3.2.14"
|
|
volumes:
|
|
- /etc/hostname:/etc/host_hostname:ro
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
command: syslog+tcp://otel-collector:2255
|
|
depends_on:
|
|
- otel-collector
|
|
schema-migrator-sync:
|
|
!!merge <<: *common
|
|
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.111.24}
|
|
container_name: schema-migrator-sync
|
|
command:
|
|
- sync
|
|
- --dsn=tcp://clickhouse:9000
|
|
- --up=
|
|
depends_on:
|
|
clickhouse:
|
|
condition: service_healthy
|
|
schema-migrator-async:
|
|
!!merge <<: *db-depend
|
|
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.111.24}
|
|
container_name: schema-migrator-async
|
|
command:
|
|
- async
|
|
- --dsn=tcp://clickhouse:9000
|
|
- --up=
|
|
networks:
|
|
signoz-net:
|
|
name: signoz-net
|
|
volumes:
|
|
alertmanager:
|
|
name: signoz-alertmanager
|
|
clickhouse:
|
|
name: signoz-clickhouse
|
|
sqlite:
|
|
name: signoz-sqlite
|
|
zookeeper-1:
|
|
name: signoz-zookeeper-1
|