Guide for running with clickhouse docker

Open
#15 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
clickhouse, docker, docker-compose

Research direction

Start with docker-compose.yml and the ClickHouse Docker command and environment variables shown in the report; reproduce the localhost:9000 failures from the compose services on macOS M1. Done means documenting a working ClickHouse setup and guidance for the reported app, worker, and web proxy errors.

Written by the indexing model from the issue text.

Description

I think a guide would be nice -- for some reason I can't get this to connect to my local clickhouse instance running on docker.

How I'm starting docker instance (on macOS m1 chip):

docker run -d -p 8123:8123 -p 9000:9000 \
    -v "$(pwd)/ch_data":/var/lib/clickhouse/ \
    -v "$(pwd)/ch_logs":/var/log/clickhouse-server/ \
    -v "$(pwd)/config.d":/etc/clickhouse-server/config.d/ \
    --name local-clickhouse --ulimit nofile=262144:262144 \
    -e CLICKHOUSE_DB=my_database -e CLICKHOUSE_USER=username -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 -e CLICKHOUSE_PASSWORD=1234 \
    clickhouse/clickhouse-server

How I start housewatch:

CLICKHOUSE_HOST=localhost \
CLICKHOUSE_CLUSTER=local-clickhouse \
CLICKHOUSE_USER=username \
CLICKHOUSE_PASSWORD=1234 \
CLICKHOUSE_SECURE=false \
docker compose -f docker-compose.yml up

Resulting errors

housewatch-app-1 | Failed to connect to localhost:9000

housewatch-worker-1 | Failed to connect to localhost:9000

housewatch-web-1 |
housewatch-web-1 | Proxy error: Could not proxy request /api/analyze/hostname from localhost:3000 to http://localhost:8000.
housewatch-web-1 | See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).
housewatch-web-1 |

Would love any insights.

Dominant language
TypeScript
Stars
634
Forks
46
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PostHog/HouseWatch

All issues in PostHog/HouseWatch

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.