From 3fe3bde0c72a320fb7aa8bcd41f21c63b6c5605a Mon Sep 17 00:00:00 2001 From: Axay sagathiya <40173579+axaysagathiya@users.noreply.github.com> Date: Sat, 5 Mar 2022 23:51:48 +0530 Subject: [PATCH] Fix: Update Documentation to configure front-end and run back-end. (#815) * fix: add all the steps to run query-service * fix: add step to add configuration to run frontend --- CONTRIBUTING.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b63015435..9b921b084d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,6 +21,12 @@ Need to update [https://github.com/SigNoz/signoz/tree/main/frontend](https://git - comment out frontend service section at `deploy/docker/clickhouse-setup/docker-compose.yaml#L59` - run `cd deploy` to move to deploy directory - Install signoz locally without the frontend + - Add below configuration to query-service section at `docker/clickhouse-setup/docker-compose.yaml#L36` + + ```docker + ports: + - "8080:8080" + ``` - If you are using x86_64 processors (All Intel/AMD processors) run `sudo docker-compose -f docker/clickhouse-setup/docker-compose.yaml up -d` - If you are on arm64 processors (Apple M1 Macbooks) run `sudo docker-compose -f docker/clickhouse-setup/docker-compose.arm.yaml up -d` - `cd ../frontend` and change baseURL to `http://localhost:8080` in file `src/constants/env.ts` @@ -47,20 +53,32 @@ Need to update [https://github.com/SigNoz/signoz/tree/main/pkg/query-service](ht ### To run ClickHouse setup (recommended for local development) - git clone https://github.com/SigNoz/signoz.git +- run `cd signoz` to move to signoz directory - run `sudo make dev-setup` to configure local setup to run query-service - comment out frontend service section at `docker/clickhouse-setup/docker-compose.yaml#L45` - comment out query-service section at `docker/clickhouse-setup/docker-compose.yaml#L28` -- add below configuration to clickhouse section at `docker/clickhouse-setup/docker-compose.yaml` -``` +- add below configuration to clickhouse section at `docker/clickhouse-setup/docker-compose.yaml#L6` +```docker expose: - 9000 ports: - 9001:9000 ``` + +- run `cd pkg/query-service/` to move to query-service directory +- Open ./constants/constants.go + - Replace ```const RELATIONAL_DATASOURCE_PATH = "/var/lib/signoz/signoz.db"``` \ + with ```const RELATIONAL_DATASOURCE_PATH = "./signoz.db".``` + - Install signoz locally without the frontend and query-service - If you are using x86_64 processors (All Intel/AMD processors) run `sudo make run-x86` - If you are on arm64 processors (Apple M1 Macbooks) run `sudo make run-arm` +#### Run locally +```console +ClickHouseUrl=tcp://localhost:9001 STORAGE=clickhouse go run main.go +``` + > Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh` **_Query Service should now be available at `http://localhost:8080`_**