Sign inSign up

contentsquareplatform/chproxy

By contentsquareplatform

•Updated about 1 year ago

Chproxy docker images repository

Image
2

50K+

contentsquareplatform/chproxy repository overview

⁠This is the official Chproxy (ClickHouse-Proxy) docker image.

⁠chproxy

Chproxy is an HTTP proxy and load balancer for the ClickHouse⁠ database.

It is an open-source community project and not an official ClickHouse project. The project are available on Github repository⁠

Full documentation is available on the official website⁠

⁠How to use image

Download the image and run the container:

docker run -d -v <LOCAL CONFIG>:/config.yml contentsquareplatform/chproxy:<VERSION TAG> -config /config.yml

Example:

docker run -d -v $(pwd)/config/examples/simple.yml:/config.yml contentsquareplatform/chproxy:v1.20.0 -config /config.yml
⁠Docker Compose example

The following example includes Chproxy, ClickHouse cluster, and Zookeeper.

The complete example is available on the official documentation page getting started⁠

docker-compose.yml

version: '3'
services:
  zookeeper:
    image: zookeeper:3.7
    container_name: zookeeper
    hostname: zookeeper
    networks:
      clickhouse-network:
        ipv4_address: 172.23.0.10
  clickhouse1:
    image: clickhouse/clickhouse-server:22.5
    volumes:
      - ${PWD}/resources/clickhouse/initdb:/docker-entrypoint-initdb.d
      - ${PWD}/resources/clickhouse/config:/etc/clickhouse-server
      - ${PWD}/resources/clickhouse/data:/data
    ports:
      - 8123:8123
    networks:
      clickhouse-network:
        ipv4_address: 172.23.0.11
    hostname: clickhouse1
    healthcheck:
      test: clickhouse-client --query "select count(1) from tutorial.views"
      interval: 2s
      timeout: 20s
      retries: 10
    depends_on:
      - zookeeper
  clickhouse2:
    image: clickhouse/clickhouse-server:22.5
    volumes:
      - ${PWD}/resources/clickhouse/initdb:/docker-entrypoint-initdb.d
      - ${PWD}/resources/clickhouse/config:/etc/clickhouse-server
      - ${PWD}/resources/clickhouse/data:/data
    networks:
      clickhouse-network:
        ipv4_address: 172.23.0.12
    hostname: clickhouse2
    healthcheck:
      test: clickhouse-client --query "select count(1) from tutorial.views"
      interval: 2s
      timeout: 20s
      retries: 10
    depends_on:
      - zookeeper
  clickhouse3:
    image: clickhouse/clickhouse-server:22.5
    volumes:
      - ${PWD}/resources/clickhouse/initdb:/docker-entrypoint-initdb.d
      - ${PWD}/resources/clickhouse/config:/etc/clickhouse-server
      - ${PWD}/resources/clickhouse/data:/data
    networks:
      clickhouse-network:
        ipv4_address: 172.23.0.13
    hostname: clickhouse3
    healthcheck:
      test: clickhouse-client --query "select count(1) from tutorial.views"
      interval: 2s
      timeout: 20s
      retries: 10
    depends_on:
      - zookeeper
  chproxy:
    image: contentsquareplatform/chproxy:1.17.2
    volumes:
      - ${PWD}/resources/chproxy/config:/config
      - ${PWD}/resources/chproxy/data:/data
    ports:
      - 9001:9001
    networks:
      clickhouse-network:
        ipv4_address: 172.23.0.14
    depends_on:
      - "clickhouse1"
      - "clickhouse2"
      - "clickhouse3"
    command: -config /config/config.yml
    healthcheck:
      test: curl 'http://127.0.0.1:9001/ping'
      interval: 2s
      timeout: 20s
      retries: 10

networks:
  clickhouse-network:
    name: clickhouse-network
    ipam:
      config:
        - subnet: 172.23.0.0/24

Tag summary

Content type

Image

Digest

sha256:2db4854fa…

Size

73.7 MB

Last updated

about 1 year ago

docker pull contentsquareplatform/chproxy:v1.30.0