Skip to content

Commit

Permalink
chore: update docker stack to run HouseWatch locally
Browse files Browse the repository at this point in the history
  • Loading branch information
Daesgar committed Jul 3, 2024
1 parent 2b2c012 commit d865a6c
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ The following are the supported environment variables for configuring your House

</details>

## 🏡 Running locally

To run HouseWatch locally along with a local ClickHouse instance, execute:

```bash
docker compose -f docker-compose.dev.yml up
```

then go to http://localhost:8080

## 💡 Motivation

At PostHog we manage a few large ClickHouse clusters and found ourselves in need of a tool to monitor and manage these more easily.
Expand Down
25 changes: 23 additions & 2 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
CLICKHOUSE_DATABASE: default
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: ""
CLICKHOUSE_CLUSTER: parallel_replicas
CLICKHOUSE_CLUSTER: housewatch
CLICKHOUSE_SECURE: false
CLICKHOUSE_VERIFY: false
CLICKHOUSE_CA: ""
Expand All @@ -35,6 +35,25 @@ services:
- redis
- rabbitmq

web:
build:
context: ./frontend
dockerfile: Dockerfile.dev

caddy:
image: caddy:2.6.1
restart: unless-stopped
ports:
- "8080:8080"
- "443:443"
environment:
SITE_ADDRESS: ":8080"
volumes:
- ./docker/Caddyfile:/etc/caddy/Caddyfile
depends_on:
- web
- app

db:
image: postgres:14-alpine
restart: on-failure
Expand Down Expand Up @@ -68,12 +87,14 @@ services:
- rabbitmq

clickhouse:
image: ${CLICKHOUSE_SERVER_IMAGE:-clickhouse/clickhouse-server:23.4.2.11}
image: ${CLICKHOUSE_SERVER_IMAGE:-clickhouse/clickhouse-server:23.12.5}
restart: on-failure
depends_on:
- zookeeper
volumes:
- ./docker/clickhouse-server/config.d:/etc/clickhouse-server/config.d
ports:
- "8123:8123"

zookeeper:
image: zookeeper:3.7.0
Expand Down
14 changes: 14 additions & 0 deletions frontend/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:20.4.0-alpine

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"

RUN corepack enable

WORKDIR /frontend

COPY . .

RUN pnpm i

CMD ["pnpm", "vite", "--port", "3000"]

0 comments on commit d865a6c

Please sign in to comment.