services:
  clickhouse:
    image: clickhouse/clickhouse-server:26.2.4-alpine
    container_name: ${CONTAINER_NAME}
    restart: always
    networks:
      - 1panel-network
    ports:
      - "${PANEL_APP_PORT_HTTP}:8123"
      - "${PANEL_APP_PORT_TCP}:9000"
    volumes:
      - ./clickhouse:/var/lib/clickhouse/
      - ./clickhouse-server:/var/log/clickhouse-server/
    environment:
      - CLICKHOUSE_USER=${CLICKHOUSE_USER}
      - CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD}
    ulimits:
      nofile:
        soft: 262144
        hard: 262144
    labels:  
      createdBy: "Apps"
networks:  
  1panel-network:  
    external: true
