Skip to content

SQL queries on self-hosted environment doesn't work #832

@mi875

Description

@mi875

When I tried to launch Laminar on my server with Docker Compose, the trace and some other basic features worked.
However, features that require SQL queries don't work, resulting in the error "ClickHouse client is not configured". The ClickHouse container actually works and is accessible. That prevents me from using the dashboards and SQL editor.

Here is the screenshot of the dashboards.

Image

Here is the docker-compose.yml

# This compose file is a lightweight version of docker-compose-full.yml.
# It is intended to be used for local quickstarts.
# It does not include RabbitMQ.
# It only includes frontend, clickhouse, postgres, and app-server.

name: lmnr

services:
  postgres:
    image: postgres:16
    volumes:
      - postgres-data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: ${POSTGRES_DB}
    healthcheck:
      test:
        ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]
      interval: 2s
      timeout: 5s
      retries: 5

  clickhouse:
    image: clickhouse/clickhouse-server:latest
    container_name: clickhouse
    volumes:
      - type: volume
        source: clickhouse-data
        target: /var/lib/clickhouse/
      - type: volume
        source: clickhouse-logs
        target: /var/log/clickhouse-server/
      - type: bind
        source: ./clickhouse-profiles-config.xml
        target: /etc/clickhouse-server/users.d/lmnr.xml
    environment:
      CLICKHOUSE_USER: ${CLICKHOUSE_USER}
      CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
    ulimits:
      nofile:
        soft: 262144
        hard: 262144
    ports:
      - "0.0.0.0:8123:8123"

  frontend:
    image: ghcr.io/lmnr-ai/frontend
    pull_policy: always
    ports:
      - "${FRONTEND_HOST_PORT:-5667}:5667"
    depends_on:
      postgres:
        condition: service_healthy
    environment:
      DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
      PORT: 5667
      BACKEND_URL: http://app-server:8000
      SHARED_SECRET_TOKEN: ${SHARED_SECRET_TOKEN}
      NEXTAUTH_URL: http://<my-IP>:5667
      NEXTAUTH_SECRET: some_secret
      NEXT_PUBLIC_URL: http://<my-IP>:5667
      ENVIRONMENT: LITE # this disables some runtime dependencies
      CLICKHOUSE_URL: http://clickhouse:8123
      CLICKHOUSE_USER: ${CLICKHOUSE_USER}
      CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
      OPENAI_API_KEY: ${OPENAI_API_KEY}
      AEAD_SECRET_KEY: ${AEAD_SECRET_KEY}

  app-server:
    image: ghcr.io/lmnr-ai/app-server
    pull_policy: always
    ports:
      - "${APP_SERVER_HOST_PORT:-8002}:8000"
      - "${APP_SERVER_GRPC_HOST_PORT:-8001}:8001"
    depends_on:
      postgres:
        condition: service_healthy
      clickhouse:
        condition: service_started
    environment:
      PORT: 8000
      GRPC_PORT: 8001
      DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
      SHARED_SECRET_TOKEN: ${SHARED_SECRET_TOKEN}
      CLICKHOUSE_URL: http://clickhouse:8123
      CLICKHOUSE_USER: ${CLICKHOUSE_USER}
      CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
      ENVIRONMENT: LITE # this disables runtime dependency on rabbitmq
      AEAD_SECRET_KEY: ${AEAD_SECRET_KEY}

volumes:
  postgres-data:
  clickhouse-data:
  clickhouse-logs:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions