PostHog / HouseWatch

Open source tool for monitoring and managing ClickHouse clusters
MIT License
524 stars 35 forks source link

Cant start docker compose: => ERROR [web 3/3] COPY build/ build/ #52

Open shuvabrata opened 1 year ago

shuvabrata commented 1 year ago

The default docker-compose.yml has an incorrect ref to "clickhouse" service. Should this be removed? I have a clickhouse cluster deployed in AWS and I am providing the hostname via the Env vars:

SITE_ADDRESS=:80 \
CLICKHOUSE_HOST=<AWS ALB hostname>\
CLICKHOUSE_CLUSTER=mycluster \
CLICKHOUSE_USER= <someusername> \
CLICKHOUSE_PASSWORD=xxxxxxxxxxx \
docker compose -f docker-compose.yml up

After removing the reference of "clickhouse" service under the depends_on section, the docker instances fails to start with the following error:

 => CANCELED [worker 1/8] FROM docker.io/library/python:3.10@sha256:1a8dcc07368065c2b285b24236a98e80355d6de7f685b416407aafb6dd32529f                                                                                 0.5s
 => => resolve docker.io/library/python:3.10@sha256:1a8dcc07368065c2b285b24236a98e80355d6de7f685b416407aafb6dd32529f                                                                                                 0.0s
 => => sha256:aa51dc5b3e4b04c28168c424bb88a7329fa5ddea735617e70aca8e276bed838a 7.53kB / 7.53kB                                                                                                                       0.0s
 => => sha256:00046d1e755ea94fa55a700ca9a10597e4fac7c47be19d970a359b0267a51fbf 0B / 24.03MB                                                                                                                          0.4s
 => => sha256:9f13f5a53d118643c1f1ff294867c09f224d00edca21f56caa71c2321f8ca004 0B / 64.11MB                                                                                                                          0.4s
 => => sha256:1a8dcc07368065c2b285b24236a98e80355d6de7f685b416407aafb6dd32529f 1.65kB / 1.65kB                                                                                                                       0.0s
 => => sha256:17b967fa748a2929eb2682018a9d0e335aeebff3963469e901b67544bd01be49 2.01kB / 2.01kB                                                                                                                       0.0s
 => => sha256:012c0b3e998c1a0c0bedcf712eaaafb188580529dd026a04aa1ce13fdb39e42b 0B / 49.56MB                                                                                                                          0.4s
 => [worker internal] load build context                                                                                                                                                                             0.0s
 => => transferring context: 3.49kB                                                                                                                                                                                  0.0s
 => [app internal] load build context                                                                                                                                                                                0.0s
 => => transferring context: 3.49kB                                                                                                                                                                                  0.0s
 => CACHED [web 1/3] FROM docker.io/library/alpine:latest@sha256:7144f7bab3d4c2648d7e59409f15ec52a18006a128c733fcff20d3a4a54ba44a                                                                                    0.0s
 => [web internal] load build context                                                                                                                                                                                0.0s
 => => transferring context: 2B                                                                                                                                                                                      0.0s
 => [web 2/3] WORKDIR /frontend                                                                                                                                                                                      0.0s
 => ERROR [web 3/3] COPY build/ build/                                                                                                                                                                               0.0s
------
 > [web 3/3] COPY build/ build/:
------
failed to solve: failed to compute cache key: failed to calculate checksum of ref b31f82cc-6f48-4507-bec3-385667894ed8::e8fy1zrfjzzwwtfpwoj97s5ac: "/build": not found

Am I doing something wrong? The error message indicates that there is an issue with the COPY command in the Dockerfile. What would be the next steps to resolve this?

shuvabrata commented 1 year ago

I was able to get around this issue by going into the ./frontend and building the react project first. I think this step created the build directory which I see missing by default.

cd frontend
npm install
npm run build

It would be useful to update the project so that it auto-builds or update steps for explicitly creating the folder or doing this build.

alexandros-kyriakides commented 10 months ago

@shuvabrata Thank you for sharing your solution. I ran into the same two problems.

ghost commented 7 months ago

I ran the command npm install and he following error appeared:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: housewatch@1.0.0-beta
npm ERR! Found: @ant-design/icons@5.3.5
npm ERR! node_modules/@ant-design/icons
npm ERR!   @ant-design/icons@"^5.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @ant-design/icons@"^4.6.0" from @ant-design/charts@1.4.3
npm ERR! node_modules/@ant-design/charts
npm ERR!   @ant-design/charts@"^1.4.2" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /home/username/.npm/_logs/2024-03-27T20_01_30_329Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/username/.npm/_logs/2024-03-27T20_01_30_329Z-debug-0.log