name: otelview-clickhouse services: clickhouse: image: clickhouse/clickhouse-server:26.8 environment: # Load-bearing, not decoration. Given none of these, the image's # entrypoint writes a users.d override restricting `default` to ::1 and # 127.0.0.1, and every connection through the published port is refused # with "Authentication failed: password is incorrect" — which is a # misleading way to report a network ACL. Setting access management to # a non-zero value takes the branch that binds `default` to ::/0 # instead. Fine for a throwaway test server; do not copy into anything # reachable from a network you do not own. CLICKHOUSE_USER: default CLICKHOUSE_PASSWORD: "" CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: "1" ulimits: nofile: soft: 262144 hard: 262144 ports: - "8123:8123" # HTTP — what this server speaks - "9000:9000" # native protocol, for clickhouse-client healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8123/ping"] interval: 2s timeout: 2s retries: 30 start_period: 5s otelview-clickhouse: build: context: . depends_on: clickhouse: condition: service_healthy environment: CLICKHOUSE_URL: http://clickhouse:8123 CLICKHOUSE_DATABASE: otelview LISTEN_ADDR: 0.0.0.0:17271 RUST_LOG: otelview_clickhouse=info ports: - "17271:17271" healthcheck: # The gRPC port accepting a TCP connection is the readiness signal: the # server binds it only after its migrations have run. test: ["CMD", "/usr/local/bin/otelview-clickhouse", "--healthcheck"] interval: 2s timeout: 2s retries: 30 start_period: 3s