Skip to content

Instantly share code, notes, and snippets.

@kovalchukrs
Last active December 21, 2023 09:18
Show Gist options
  • Select an option

  • Save kovalchukrs/3ddf0aa1c5453ce42f5e952f85405588 to your computer and use it in GitHub Desktop.

Select an option

Save kovalchukrs/3ddf0aa1c5453ce42f5e952f85405588 to your computer and use it in GitHub Desktop.
ClickHouse compose

Docker compose for ClickHouse DB

services:
  clickhouse:
    image: clickhouse/clickhouse-server:23.8.4.69
    ports:
      # http interface
      - "8123:8123"
      # native interface for cliclkhiuse-client
      - "9000:9000"
      # metrics for prometheus
    # - "19115:9115"
    ulimits:
      nofile:
        soft: 262144
        hard: 262144
    volumes:
    # - /etc/hosts:/etc/hosts
      - /opt/docker-data/project/config.xml:/etc/clickhouse-server/config.xml
      - /opt/docker-data/project/config.d/backup_disk.xml:/etc/clickhouse-server/config.d/backup_disk.xml
      - /opt/docker-data/project/users.d/users.default.xml:/etc/clickhouse-server/users.d/users.default.xml
      - /opt/docker-data/project/clickhousedb:/var/lib/clickhouse
      - /opt/docker-data/project/clickhouselog:/var/log/clickhouse-server
      
@kovalchukrs
Copy link
Author

users.default.xml

<clickhouse>
    <!-- Users and ACL. -->
    <users>
        <!-- If user name was not specified, 'default' user is used. -->
        <default>
            <!-- User can create other users and grant rights to them. -->
            <access_management>1</access_management>
        </default>
    </users>
</clickhouse>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment