name: coroot
services:
coroot:
restart: always
image: ghcr.io/coroot/coroot${LICENSE_KEY:+-ee} # set 'coroot-ee' as the image if LICENSE_KEY is defined
pull_policy: always
user: root
volumes:
- coroot_data:/data
ports:
- 8080:8080
command:
- '--data-dir=/data'
- '--bootstrap-prometheus-url=http://prometheus:9090'
- '--bootstrap-refresh-interval=15s'
- '--bootstrap-clickhouse-address=clickhouse:9000'
environment:
- LICENSE_KEY=${LICENSE_KEY:-}
depends_on:
clickhouse:
condition: service_healthy
prometheus:
condition: service_healthy
node-agent:
restart: always
image: ghcr.io/coroot/coroot-node-agent
pull_policy: always
privileged: true
pid: "host"
volumes:
- /sys/kernel/tracing:/sys/kernel/tracing
- /sys/kernel/debug:/sys/kernel/debug
- /sys/fs/cgroup:/host/sys/fs/cgroup
- node_agent_data:/data
command:
- '--collector-endpoint=http://coroot:8080'
- '--cgroupfs-root=/host/sys/fs/cgroup'
- '--wal-dir=/data'
cluster-agent:
restart: always
image: ghcr.io/coroot/coroot-cluster-agent
pull_policy: always
volumes:
- cluster_agent_data:/data
command:
- '--coroot-url=http://coroot:8080'
- '--metrics-scrape-interval=15s'
- '--metrics-wal-dir=/data'
depends_on:
- coroot
prometheus:
restart: always
image: prom/prometheus:v2.53.5
volumes:
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--web.enable-lifecycle'
- '--web.enable-remote-write-receiver'
ports:
- '127.0.0.1:9090:9090'
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9090/-/healthy"]
interval: 3s
timeout: 5s
retries: 5
start_period: 10s
clickhouse:
restart: always
image: clickhouse/clickhouse-server:24.3
environment:
CLICKHOUSE_SKIP_USER_SETUP: "1"
volumes:
- clickhouse_data:/var/lib/clickhouse
- clickhouse_logs:/var/log/clickhouse-server
ports:
- '127.0.0.1:9000:9000'
ulimits:
nofile:
soft: 262144
hard: 262144
configs:
- source: clickhouse_logging
target: /etc/clickhouse-server/config.d/logging_rules.xml
- source: clickhouse_user_logging
target: /etc/clickhouse-server/config.d/user_logging.xml
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8123/ping"]
interval: 3s
timeout: 5s
retries: 5
start_period: 10s
volumes:
prometheus_data: {}
clickhouse_data: {}
clickhouse_logs: {}
coroot_data: {}
node_agent_data: {}
cluster_agent_data: {}
configs:
clickhouse_logging:
content: |
warning
true
clickhouse_user_logging:
content: |
0
0
0