Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
dx: introduce HYPERDX_API_* + HYPERDX_APP_* env vars
  • Loading branch information
wrn14897 committed Sep 21, 2023
commit 56c1064f934fd766b3778a4c31274c050bd5ab16
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
IMAGE_NAME=ghcr.io/hyperdxio/hyperdx
IMAGE_VERSION=1.1.1

# Set up domain URLs
HYPERDX_API_PORT=8000
HYPERDX_API_URL=http://localhost
HYPERDX_APP_PORT=8080
HYPERDX_APP_URL=http://localhost
20 changes: 10 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ services:
CLICKHOUSE_HOST: http://ch-server:8123
CLICKHOUSE_PASSWORD: aggregator
CLICKHOUSE_USER: aggregator
FRONTEND_URL: 'http://localhost:8080' # need to be localhost (CORS)
FRONTEND_URL: ${HYPERDX_APP_URL} # need to be localhost (CORS)
MONGO_URI: 'mongodb://db:27017/hyperdx'
NODE_ENV: development
PORT: 8001
REDIS_URL: redis://redis:6379
SERVER_URL: 'http://localhost:8000'
SERVER_URL: ${HYPERDX_API_URL}
networks:
- internal
depends_on:
Expand All @@ -103,7 +103,7 @@ services:
CLICKHOUSE_LOG_LEVEL: trace
CLICKHOUSE_PASSWORD: worker
CLICKHOUSE_USER: worker
FRONTEND_URL: 'http://localhost:8080' # need to be localhost (CORS)
FRONTEND_URL: ${HYPERDX_APP_URL} # need to be localhost (CORS)
HDX_NODE_ADVANCED_NETWORK_CAPTURE: 1
HDX_NODE_BETA_MODE: 0
HDX_NODE_CONSOLE_CAPTURE: 1
Expand All @@ -126,7 +126,7 @@ services:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-api
container_name: hdx-oss-api
ports:
- 8000:8000
- ${HYPERDX_API_PORT}:${HYPERDX_API_PORT}
environment:
AGGREGATOR_API_URL: 'http://aggregator:8001'
APP_TYPE: 'api'
Expand All @@ -135,7 +135,7 @@ services:
CLICKHOUSE_PASSWORD: api
CLICKHOUSE_USER: api
EXPRESS_SESSION_SECRET: 'hyperdx is cool 👋'
FRONTEND_URL: 'http://localhost:8080' # need to be localhost (CORS)
FRONTEND_URL: ${HYPERDX_APP_URL} # need to be localhost (CORS)
HDX_NODE_ADVANCED_NETWORK_CAPTURE: 1
HDX_NODE_BETA_MODE: 1
HDX_NODE_CONSOLE_CAPTURE: 1
Expand All @@ -146,9 +146,9 @@ services:
NODE_ENV: development
OTEL_EXPORTER_OTLP_ENDPOINT: 'http://otel-collector:4318'
OTEL_SERVICE_NAME: 'hdx-oss-api'
PORT: 8000
PORT: ${HYPERDX_API_PORT}
REDIS_URL: redis://redis:6379
SERVER_URL: 'http://localhost:8000'
SERVER_URL: ${HYPERDX_API_URL}:${HYPERDX_API_PORT}
USAGE_STATS_ENABLED: ${USAGE_STATS_ENABLED:-true}
networks:
- internal
Expand All @@ -160,14 +160,14 @@ services:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-app
container_name: hdx-oss-app
ports:
- 8080:8080
- ${HYPERDX_APP_PORT}:${HYPERDX_APP_PORT}
environment:
NEXT_PUBLIC_API_SERVER_URL: 'http://localhost:8000' # need to be localhost (CORS)
NEXT_PUBLIC_API_SERVER_URL: ${HYPERDX_API_URL}:${HYPERDX_API_PORT} # need to be localhost (CORS)
NEXT_PUBLIC_HDX_API_KEY: ${HYPERDX_API_KEY}
NEXT_PUBLIC_HDX_COLLECTOR_URL: 'http://localhost:4318'
NEXT_PUBLIC_HDX_SERVICE_NAME: 'hdx-oss-app'
NODE_ENV: development
PORT: 8080
PORT: ${HYPERDX_APP_PORT}
networks:
- internal
depends_on:
Expand Down
6 changes: 5 additions & 1 deletion packages/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ ARG CODE_VERSION

ENV CODE_VERSION=$CODE_VERSION

EXPOSE 8000
ARG PORT

ENV PORT=$PORT

EXPOSE ${PORT}

USER node

Expand Down
6 changes: 4 additions & 2 deletions packages/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ COPY --from=builder /app/package.json ./package.json

USER nextjs

EXPOSE 8080
ARG PORT

ENV PORT=$PORT

ENV PORT 8080
EXPOSE ${PORT}

# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
Expand Down