diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b215b9d478..4c0e474b3a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,7 @@ If you don't want to install SigNoz backend just for doing frontend development, - `yarn install` - `yarn dev` -**_Frontend should now be accessible at `http://localhost:3000/application`_** +**_Frontend should now be accessible at `http://localhost:3301/application`_** # Contribute to Query-Service @@ -69,7 +69,7 @@ Need to update [https://github.com/SigNoz/charts](https://github.com/SigNoz/char - [minikube](https://minikube.sigs.k8s.io/docs/start/) - create a k8s cluster and make sure `kubectl` points to the locally created k8s cluster - run `helm install -n platform --create-namespace my-release charts/signoz` to install SigNoz chart -- run `kubectl -n platform port-forward svc/my-release-frontend 3000:3000` to make SigNoz UI available at [localhost:3000](http://localhost:3000) +- run `kubectl -n platform port-forward svc/my-release-frontend 3301:3301` to make SigNoz UI available at [localhost:3301](http://localhost:3301) **To load data with HotROD sample app:** diff --git a/deploy/docker-swarm/clickhouse-setup/docker-compose.yaml b/deploy/docker-swarm/clickhouse-setup/docker-compose.yaml index 66afd79142..7313a96251 100644 --- a/deploy/docker-swarm/clickhouse-setup/docker-compose.yaml +++ b/deploy/docker-swarm/clickhouse-setup/docker-compose.yaml @@ -50,7 +50,7 @@ services: links: - "query-service" ports: - - "3000:3000" + - "3301:3301" volumes: - ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf diff --git a/deploy/docker-swarm/common/nginx-config.conf b/deploy/docker-swarm/common/nginx-config.conf index 881cdc77cb..f059d3972e 100644 --- a/deploy/docker-swarm/common/nginx-config.conf +++ b/deploy/docker-swarm/common/nginx-config.conf @@ -1,5 +1,5 @@ server { - listen 3000; + listen 3301; server_name _; gzip on; diff --git a/deploy/docker/clickhouse-setup/docker-compose.arm.yaml b/deploy/docker/clickhouse-setup/docker-compose.arm.yaml index 6f7a8912a7..cd68ead27f 100644 --- a/deploy/docker/clickhouse-setup/docker-compose.arm.yaml +++ b/deploy/docker/clickhouse-setup/docker-compose.arm.yaml @@ -3,12 +3,6 @@ version: "2.4" services: clickhouse: image: altinity/clickhouse-server:21.12.3.32.altinitydev.arm - expose: - - 8123 - - 9000 - ports: - - 9001:9000 - - 8123:8123 volumes: - ./clickhouse-config.xml:/etc/clickhouse-server/config.xml - ./data/clickhouse/:/var/lib/clickhouse/ @@ -27,15 +21,11 @@ services: command: - '--config.file=/prometheus/alertmanager.yml' - '--storage.path=/data' - ports: - - 9093:9093 query-service: image: signoz/query-service:0.5.4 container_name: query-service command: ["-config=/root/config/prometheus.yml"] - ports: - - "8080:8080" volumes: - ./prometheus.yml:/root/config/prometheus.yml - ../dashboards:/root/config/dashboards @@ -54,10 +44,8 @@ services: container_name: frontend depends_on: - query-service - links: - - "query-service" ports: - - "3000:3000" + - "3301:3301" volumes: - ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf @@ -67,16 +55,7 @@ services: volumes: - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml ports: - - "1777:1777" # pprof extension - - "8887:8888" # Prometheus metrics exposed by the agent - - "14268:14268" # Jaeger receiver - - "55678" # OpenCensus receiver - - "55680:55680" # OTLP HTTP/2.0 legacy port - - "55681:55681" # OTLP HTTP/1.0 receiver - "4317:4317" # OTLP GRPC receiver - - "55679:55679" # zpages extension - - "13133" # health_check - - "8889:8889" # prometheus exporter mem_limit: 2000m restart: always depends_on: @@ -95,8 +74,6 @@ services: hotrod: image: jaegertracing/example-hotrod:1.30 container_name: hotrod - ports: - - "9000:8080" logging: options: max-size: 50m @@ -109,8 +86,6 @@ services: image: "grubykarol/locust:1.2.3-python3.9-alpine3.12" container_name: load-hotrod hostname: load-hotrod - ports: - - "8089:8089" environment: ATTACKED_HOST: http://hotrod:8080 LOCUST_MODE: standalone diff --git a/deploy/docker/clickhouse-setup/docker-compose.yaml b/deploy/docker/clickhouse-setup/docker-compose.yaml index 8621c77e12..e7c8b40ee3 100644 --- a/deploy/docker/clickhouse-setup/docker-compose.yaml +++ b/deploy/docker/clickhouse-setup/docker-compose.yaml @@ -3,16 +3,9 @@ version: "2.4" services: clickhouse: image: yandex/clickhouse-server:21.12.3.32 - expose: - - 8123 - - 9000 - ports: - - 9001:9000 - - 8123:8123 volumes: - ./clickhouse-config.xml:/etc/clickhouse-server/config.xml - ./data/clickhouse/:/var/lib/clickhouse/ - healthcheck: # "clickhouse", "client", "-u ${CLICKHOUSE_USER}", "--password ${CLICKHOUSE_PASSWORD}", "-q 'SELECT 1'" test: ["CMD", "wget", "--spider", "-q", "localhost:8123/ping"] @@ -28,15 +21,11 @@ services: command: - '--config.file=/prometheus/alertmanager.yml' - '--storage.path=/data' - ports: - - 9093:9093 query-service: image: signoz/query-service:0.5.4 container_name: query-service command: ["-config=/root/config/prometheus.yml"] - ports: - - "8080:8080" volumes: - ./prometheus.yml:/root/config/prometheus.yml - ../dashboards:/root/config/dashboards @@ -46,7 +35,6 @@ services: - STORAGE=clickhouse - GODEBUG=netdns=go - TELEMETRY_ENABLED=true - depends_on: clickhouse: condition: service_healthy @@ -56,10 +44,8 @@ services: container_name: frontend depends_on: - query-service - links: - - "query-service" ports: - - "3000:3000" + - "3301:3301" volumes: - ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf @@ -69,16 +55,7 @@ services: volumes: - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml ports: - - "1777:1777" # pprof extension - - "8887:8888" # Prometheus metrics exposed by the agent - - "14268:14268" # Jaeger receiver - - "55678" # OpenCensus receiver - - "55680:55680" # OTLP HTTP/2.0 legacy port - - "55681:55681" # OTLP HTTP/1.0 receiver - "4317:4317" # OTLP GRPC receiver - - "55679:55679" # zpages extension - - "13133" # health_check - - "8889:8889" # prometheus exporter mem_limit: 2000m restart: always depends_on: @@ -97,8 +74,6 @@ services: hotrod: image: jaegertracing/example-hotrod:1.30 container_name: hotrod - ports: - - "9000:8080" logging: options: max-size: 50m @@ -111,8 +86,6 @@ services: image: "grubykarol/locust:1.2.3-python3.9-alpine3.12" container_name: load-hotrod hostname: load-hotrod - ports: - - "8089:8089" environment: ATTACKED_HOST: http://hotrod:8080 LOCUST_MODE: standalone diff --git a/deploy/docker/common/nginx-config.conf b/deploy/docker/common/nginx-config.conf index dd5eac0c83..3c7a9db8f0 100644 --- a/deploy/docker/common/nginx-config.conf +++ b/deploy/docker/common/nginx-config.conf @@ -1,5 +1,5 @@ server { - listen 3000; + listen 3301; server_name _; gzip on; diff --git a/deploy/docker/druid-kafka-setup/docker-compose-tiny.yaml b/deploy/docker/druid-kafka-setup/docker-compose-tiny.yaml index 5e4e82af1f..20ce14e822 100644 --- a/deploy/docker/druid-kafka-setup/docker-compose-tiny.yaml +++ b/deploy/docker/druid-kafka-setup/docker-compose-tiny.yaml @@ -167,7 +167,8 @@ services: container_name: query-service depends_on: - - router + router: + condition: service_healthy ports: - "8080:8080" volumes: @@ -180,10 +181,6 @@ services: - POSTHOG_API_KEY=H-htDCae7CR3RV57gUzmol6IAKtm5IMCvbcm_fwnL-w - GODEBUG=netdns=go - depends_on: - router: - condition: service_healthy - frontend: image: signoz/frontend:0.4.1 container_name: frontend @@ -193,7 +190,7 @@ services: links: - "query-service" ports: - - "3000:3000" + - "3301:3301" volumes: - ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf diff --git a/deploy/docker/druid-kafka-setup/docker-compose.yaml b/deploy/docker/druid-kafka-setup/docker-compose.yaml index a4ccf66af0..c47823492f 100644 --- a/deploy/docker/druid-kafka-setup/docker-compose.yaml +++ b/deploy/docker/druid-kafka-setup/docker-compose.yaml @@ -162,7 +162,8 @@ services: container_name: query-service depends_on: - - router + router: + condition: service_healthy ports: - "8080:8080" @@ -176,10 +177,6 @@ services: - POSTHOG_API_KEY=H-htDCae7CR3RV57gUzmol6IAKtm5IMCvbcm_fwnL-w - GODEBUG=netdns=go - depends_on: - router: - condition: service_healthy - frontend: image: signoz/frontend:0.4.1 container_name: frontend @@ -189,7 +186,7 @@ services: links: - "query-service" ports: - - "3000:3000" + - "3301:3301" volumes: - ./nginx-config.conf:/etc/nginx/conf.d/default.conf diff --git a/deploy/install.sh b/deploy/install.sh index 54bef5d067..2ee9983ff1 100755 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -102,7 +102,7 @@ check_os() { # The script should error out in case they aren't available check_ports_occupied() { local port_check_output - local ports_pattern="80|3000|8080" + local ports_pattern="80|3301|8080" if is_mac; then port_check_output="$(netstat -anp tcp | awk '$6 == "LISTEN" && $4 ~ /^.*\.('"$ports_pattern"')$/')" @@ -225,7 +225,7 @@ wait_for_containers_start() { # The while loop is important because for-loops don't work for dynamic values while [[ $timeout -gt 0 ]]; do - status_code="$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/api/v1/services/list || true)" + status_code="$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3301/api/v1/services/list || true)" if [[ status_code -eq 200 ]]; then break else @@ -492,7 +492,7 @@ else echo "" echo "🟢 Your installation is complete!" echo "" - echo -e "🟢 Your frontend is running on http://localhost:3000" + echo -e "🟢 Your frontend is running on http://localhost:3301" echo "" if [ $setup_type == 'clickhouse' ]; then diff --git a/frontend/Dockerfile b/frontend/Dockerfile index ce3d7022ef..0fb029f5f3 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -32,6 +32,6 @@ RUN rm -rf /usr/share/nginx/html/* # Copy from the stahg 1 COPY --from=builder /frontend/build /usr/share/nginx/html -EXPOSE 3000 +EXPOSE 3301 ENTRYPOINT ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/frontend/README.md b/frontend/README.md index 34269bf73a..99a36710cb 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -44,7 +44,7 @@ In the project directory, you can run: ### `yarn start` Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. +Open [http://localhost:3301](http://localhost:3301) to view it in the browser. The page will reload if you make edits.\ You will also see any lint errors in the console. diff --git a/frontend/conf/default.conf b/frontend/conf/default.conf index ec9fb99d70..dc0475eaf4 100644 --- a/frontend/conf/default.conf +++ b/frontend/conf/default.conf @@ -1,5 +1,5 @@ server { - listen 3000; + listen 3301; server_name _; gzip on; diff --git a/frontend/docker-compose.yml b/frontend/docker-compose.yml index 2a451ded94..8bc085de40 100644 --- a/frontend/docker-compose.yml +++ b/frontend/docker-compose.yml @@ -4,4 +4,4 @@ services: build: . image: signoz/frontend:latest ports: - - "3000:3000" + - "3301:3301" diff --git a/frontend/webpack.config.js b/frontend/webpack.config.js index 4e27524146..3c2b8488fe 100644 --- a/frontend/webpack.config.js +++ b/frontend/webpack.config.js @@ -35,7 +35,7 @@ const config = { open: true, hot: true, liveReload: true, - port: portFinderSync.getPort(3000), + port: portFinderSync.getPort(3301), static: { directory: resolve(__dirname, 'public'), publicPath: '/', diff --git a/pkg/query-service/app/clickhouseReader/reader.go b/pkg/query-service/app/clickhouseReader/reader.go index ba20131876..ab124de5e9 100644 --- a/pkg/query-service/app/clickhouseReader/reader.go +++ b/pkg/query-service/app/clickhouseReader/reader.go @@ -168,7 +168,7 @@ func (r *ClickHouseReader) Start() { notifier := notifier.NewManager(&cfg.notifier, log.With(logger, "component", "notifier")) // notifier.ApplyConfig(conf) - ExternalURL, err := computeExternalURL("", "0.0.0.0:3000") + ExternalURL, err := computeExternalURL("", "0.0.0.0:3301") if err != nil { fmt.Fprintln(os.Stderr, errors.Wrapf(err, "parse external URL %q", ExternalURL.String())) os.Exit(2)