mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-10 02:29:03 +08:00
Gitpodify the Signoz (#634)
* chore(docs): updated lines of frontend & query sec * fix: update baseURL for local & gitpod * chore: allow all for dev to run on https * chore(docs): add maintainer note at docker-compose * chore: update gitignore to ignore .db & logs * chore: upd lines of fe & query-service & notes * feat: gitpodify the signoz with all envs. & ports * fix: relative path of .scripts dir * chore(ci): distribute tasks in gitpod.yml * fix: run docker image while init * fix: add empty url option for `baseURL`
This commit is contained in:
parent
57992134bc
commit
07183d5189
36
.gitpod.yml
Normal file
36
.gitpod.yml
Normal file
@ -0,0 +1,36 @@
|
||||
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
|
||||
# and commit this file to your remote git repository to share the goodness with others.
|
||||
|
||||
|
||||
tasks:
|
||||
- name: Run Script to Comment ut required lines
|
||||
init: |
|
||||
cd ./.scripts
|
||||
sh commentLinesForSetup.sh
|
||||
|
||||
- name: Run Docker Images
|
||||
init: |
|
||||
cd ./deploy
|
||||
sudo docker-compose --env-file ./docker/clickhouse-setup/env/x86_64.env -f docker/clickhouse-setup/docker-compose.yaml up -d
|
||||
# command:
|
||||
|
||||
- name: Run Frontend
|
||||
init: |
|
||||
cd ./frontend
|
||||
yarn install
|
||||
command:
|
||||
yarn dev
|
||||
|
||||
ports:
|
||||
- port: 3000
|
||||
onOpen: open-browser
|
||||
- port: 8080
|
||||
onOpen: ignore
|
||||
- port: 9000
|
||||
onOpen: ignore
|
||||
- port: 8123
|
||||
onOpen: ignore
|
||||
- port: 8089
|
||||
onOpen: ignore
|
||||
- port: 9093
|
||||
onOpen: ignore
|
7
.scripts/commentLinesForSetup.sh
Normal file
7
.scripts/commentLinesForSetup.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# It Comments out the Line Query-Service & Frontend Section of deploy/docker/clickhouse-setup/docker-compose.yaml
|
||||
# Update the Line Numbers when deploy/docker/clickhouse-setup/docker-compose.yaml chnages.
|
||||
# Docs Ref.: https://github.com/SigNoz/signoz/blob/main/CONTRIBUTING.md#contribute-to-frontend-with-docker-installation-of-signoz
|
||||
|
||||
sed -i 38,70's/.*/# &/' .././deploy/docker/clickhouse-setup/docker-compose.yaml
|
@ -18,7 +18,7 @@ Need to update [https://github.com/SigNoz/signoz/tree/main/frontend](https://git
|
||||
### Contribute to Frontend with Docker installation of SigNoz
|
||||
|
||||
- `git clone https://github.com/SigNoz/signoz.git && cd signoz`
|
||||
- comment out frontend service section at `deploy/docker/clickhouse-setup/docker-compose.yaml#L38`
|
||||
- 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
|
||||
- If you are using x86_64 processors (All Intel/AMD processors) run `sudo docker-compose --env-file ./docker/clickhouse-setup/env/x86_64.env -f docker/clickhouse-setup/docker-compose.yaml up -d`
|
||||
@ -27,6 +27,8 @@ Need to update [https://github.com/SigNoz/signoz/tree/main/frontend](https://git
|
||||
- `yarn install`
|
||||
- `yarn dev`
|
||||
|
||||
> Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh`
|
||||
|
||||
### Contribute to Frontend without installing SigNoz backend
|
||||
|
||||
If you don't want to install SigNoz backend just for doing frontend development, we can provide you with test environments which you can use as the backend. Please ping us in #contributing channel in our [slack community](https://join.slack.com/t/signoz-community/shared_invite/zt-lrjknbbp-J_mI13rlw8pGF4EWBnorJA) and we will DM you with `<test environment URL>`
|
||||
@ -46,16 +48,28 @@ Need to update [https://github.com/SigNoz/signoz/tree/main/pkg/query-service](ht
|
||||
|
||||
- git clone https://github.com/SigNoz/signoz.git
|
||||
- run `sudo make dev-setup` to configure local setup to run query-service
|
||||
- comment out frontend service section at `deploy/docker/clickhouse-setup/docker-compose.yaml#L38`
|
||||
- comment out query-service section at `deploy/docker/clickhouse-setup/docker-compose.yaml#L22`
|
||||
- comment out frontend service section at `docker/clickhouse-setup/docker-compose.yaml#L59`
|
||||
- comment out query-service section at `docker/clickhouse-setup/docker-compose.yaml#L38`
|
||||
- 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`
|
||||
|
||||
> 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`_**
|
||||
|
||||
> If you want to see how, frontend plays with query service, you can run frontend also in you local env with the baseURL changed to `http://localhost:8080` in file `src/constants/env.ts` as the query-service is now running at port `8080`
|
||||
|
||||
---
|
||||
Instead of configuring a local setup, you can also use [Gitpod](https://www.gitpod.io/), a VSCode-based Web IDE.
|
||||
|
||||
Click the button below. A workspace with all required environments will be created.
|
||||
|
||||
[](https://gitpod.io/#https://github.com/SigNoz/signoz)
|
||||
|
||||
> To use it on your forked repo, edit the 'Open in Gitpod' button url to `https://gitpod.io/#https://github.com/<your-github-username>/signoz`
|
||||
|
||||
---
|
||||
|
||||
## General Instructions
|
||||
|
||||
|
@ -32,6 +32,9 @@ services:
|
||||
ports:
|
||||
- 9093:9093
|
||||
|
||||
# Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh` & `./CONTRIBUTING.md`
|
||||
|
||||
|
||||
query-service:
|
||||
image: signoz/query-service:0.5.4
|
||||
container_name: query-service
|
||||
|
@ -1,3 +1,3 @@
|
||||
export const ENVIRONMENT = {
|
||||
baseURL: process?.env?.FRONTEND_API_ENDPOINT || '',
|
||||
baseURL: process?.env?.FRONTEND_API_ENDPOINT || process.env.GITPOD_WORKSPACE_URL.replace('://','://8080-') ||'http://localhost:8080'|| '',
|
||||
};
|
||||
|
@ -41,6 +41,7 @@ const config = {
|
||||
publicPath: '/',
|
||||
watch: true,
|
||||
},
|
||||
allowedHosts: 'all',
|
||||
},
|
||||
target: 'web',
|
||||
output: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user