From d1264d521c8d244d3a89020c50f4724401f18530 Mon Sep 17 00:00:00 2001 From: Warren <5959690+wrn14897@users.noreply.github.com> Date: Tue, 16 Apr 2024 17:46:53 -0700 Subject: [PATCH] fix: dns issue in local mode (#373) --- docker/local/build.sh | 2 +- docker/local/entry.sh | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docker/local/build.sh b/docker/local/build.sh index 8c09227db..c57e2ef30 100755 --- a/docker/local/build.sh +++ b/docker/local/build.sh @@ -1,7 +1,7 @@ #!/bin/bash # Meant to be run from the root of the repo -docker build --squash -f ./docker/local/Dockerfile \ +docker build --squash -t hdx-oss-dev-local -f ./docker/local/Dockerfile \ --build-context clickhouse=./docker/clickhouse \ --build-context otel-collector=./docker/otel-collector \ --build-context ingestor=./docker/ingestor \ diff --git a/docker/local/entry.sh b/docker/local/entry.sh index 11b07244f..bd29b7840 100644 --- a/docker/local/entry.sh +++ b/docker/local/entry.sh @@ -13,18 +13,21 @@ export SERVER_URL="${SERVER_URL:-${HYPERDX_API_URL:-http://localhost}:${HYPERDX_ export FRONTEND_URL="${FRONTEND_URL:-${HYPERDX_APP_URL:-http://localhost}:${HYPERDX_APP_PORT:-8080}}" # Internal Services -export AGGREGATOR_API_URL="http://localhost:8001" -export CLICKHOUSE_HOST="http://localhost:8123" -export MONGO_URI="mongodb://localhost:27017/hyperdx" -export REDIS_URI="redis://localhost:6379" +export AGGREGATOR_API_URL="http://aggregator:8001" +export CLICKHOUSE_HOST="http://ch-server:8123" +export MONGO_URI="mongodb://db:27017/hyperdx" +export REDIS_URI="redis://redis:6379" export EXPRESS_SESSION_SECRET="hyperdx is cool 👋" export IS_LOCAL_APP_MODE="DANGEROUSLY_is_local_app_mode💀" export NEXT_TELEMETRY_DISABLED="1" # Simulate Docker Service DNS -echo "127.0.0.1 ingestor" >> /etc/hosts echo "127.0.0.1 aggregator" >> /etc/hosts +echo "127.0.0.1 ch-server" >> /etc/hosts +echo "127.0.0.1 db" >> /etc/hosts +echo "127.0.0.1 ingestor" >> /etc/hosts +echo "127.0.0.1 redis" >> /etc/hosts echo "Visit the HyperDX UI at $FRONTEND_URL/search" echo ""