version: '3' services: clickhouse-1: image: clickhouse/clickhouse-server:24.7 restart: on-failure environment: CLICKHOUSE_DB: uptrace SHARD: shard1 REPLICA: replica1 KEEPER_ID: 1 healthcheck: test: ['CMD', 'wget', '--spider', '-q', 'localhost:8123/ping'] interval: 1s timeout: 1s retries: 30 user: clickhouse volumes: - ch1_data:/var/lib/clickhouse - ./config/clickhouse/config.xml:/etc/clickhouse-server/config.d/config.xml - ./config/clickhouse/cluster.xml:/etc/clickhouse-server/config.d/cluster.xml - ./config/clickhouse/keeper.xml:/etc/clickhouse-server/config.d/keeper.xml - ./config/clickhouse/users.xml:/etc/clickhouse-server/users.d/users.xml ports: - '8123:8123' - '9000:9000' - '9440:9440' extra_hosts: - 'host.docker.internal:host-gateway' clickhouse-2: image: clickhouse/clickhouse-server:24.7 restart: on-failure environment: CLICKHOUSE_DB: uptrace SHARD: shard1 REPLICA: replica2 KEEPER_ID: 2 volumes: - ch2_data:/var/lib/clickhouse - ./config/clickhouse/config.xml:/etc/clickhouse-server/config.d/config.xml - ./config/clickhouse/cluster.xml:/etc/clickhouse-server/config.d/cluster.xml - ./config/clickhouse/keeper.xml:/etc/clickhouse-server/config.d/keeper.xml - ./config/clickhouse/users.xml:/etc/clickhouse-server/users.d/users.xml ports: - '9001:9000' extra_hosts: - 'host.docker.internal:host-gateway' clickhouse-3: image: clickhouse/clickhouse-server:24.7 restart: on-failure environment: CLICKHOUSE_DB: uptrace SHARD: shard2 REPLICA: replica1 KEEPER_ID: 3 volumes: - ch3_data:/var/lib/clickhouse - ./config/clickhouse/config.xml:/etc/clickhouse-server/config.d/config.xml - ./config/clickhouse/cluster.xml:/etc/clickhouse-server/config.d/cluster.xml - ./config/clickhouse/keeper.xml:/etc/clickhouse-server/config.d/keeper.xml - ./config/clickhouse/users.xml:/etc/clickhouse-server/users.d/users.xml ports: - '9002:9000' extra_hosts: - 'host.docker.internal:host-gateway' clickhouse-4: image: clickhouse/clickhouse-server:24.7 restart: on-failure environment: CLICKHOUSE_DB: uptrace SHARD: shard2 REPLICA: replica2 KEEPER_ID: 4 volumes: - ch4_data:/var/lib/clickhouse - ./config/clickhouse/config.xml:/etc/clickhouse-server/config.d/config.xml - ./config/clickhouse/cluster.xml:/etc/clickhouse-server/config.d/cluster.xml - ./config/clickhouse/keeper.xml:/etc/clickhouse-server/config.d/keeper.xml - ./config/clickhouse/users.xml:/etc/clickhouse-server/users.d/users.xml ports: - '9003:9000' extra_hosts: - 'host.docker.internal:host-gateway' postgres: image: postgres:15-alpine restart: on-failure environment: PGDATA: /var/lib/postgresql/data/pgdata POSTGRES_USER: uptrace POSTGRES_PASSWORD: uptrace volumes: - 'pg_data:/var/lib/postgresql/data/pgdata' ports: - '5432:5432' otelcol: image: otel/opentelemetry-collector-contrib:0.88.0 restart: on-failure volumes: - ./config/otel-collector.yaml:/etc/otelcol-contrib/config.yaml ports: - '4317:4317' - '4318:4318' extra_hosts: - 'host.docker.internal:host-gateway' alertmanager: image: prom/alertmanager:v0.24.0 restart: on-failure volumes: - ./config/alertmanager.yml:/etc/alertmanager/config.yml - alertmanager_data:/alertmanager ports: - 9093:9093 command: - '--config.file=/etc/alertmanager/config.yml' - '--storage.path=/alertmanager' vector: image: timberio/vector:0.28.X-alpine volumes: - ./config/vector.toml:/etc/vector/vector.toml:ro extra_hosts: - 'host.docker.internal:host-gateway' keycloak: image: quay.io/keycloak/keycloak:19.0.2 restart: on-failure ports: - 9090:8080 environment: KEYCLOAK_ADMIN: admin KEYCLOAK_ADMIN_PASSWORD: admin command: start-dev grafana: image: grafana/grafana:10.3.1 restart: on-failure volumes: - ./config/grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml - ./config/grafana/custom.ini:/etc/grafana/grafana.ini ports: - '3000:3000' extra_hosts: - 'host.docker.internal:host-gateway' prometheus: image: prom/prometheus:v2.36.2 restart: always volumes: - ./config/prometheus/:/etc/prometheus/ - 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' extra_hosts: - 'host.docker.internal:host-gateway' node_exporter: image: quay.io/prometheus/node-exporter:latest container_name: node_exporter command: - '--path.rootfs=/host' network_mode: host pid: host restart: unless-stopped volumes: - '/:/host:ro,rslave' mailpit: image: axllent/mailpit restart: always ports: - 1025:1025 - 8025:8025 environment: MP_MAX_MESSAGES: 5000 MP_DATA_FILE: /data/mailpit.db MP_SMTP_AUTH_ACCEPT_ANY: 1 MP_SMTP_AUTH_ALLOW_INSECURE: 1 volumes: - mailpit_data:/data volumes: ch1_data: ch2_data: ch3_data: ch4_data: pg_data: alertmanager_data: prometheus_data: mailpit_data: