Skip to content

Commit d1fc0c7

Browse files
authored
fix: change NEXT_PUBLIC_SERVER_URL to SERVER_URL because it's not available on the frontend (#936)
1 parent 1ef1ed5 commit d1fc0c7

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

.changeset/dry-suns-laugh.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperdx/app": patch
3+
---
4+
5+
fix: change NEXT_PUBLIC_SERVER_URL to SERVER_URL

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ services:
5757
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
5858
MINER_API_URL: 'http://miner:5123'
5959
MONGO_URI: 'mongodb://db:27017/hyperdx'
60-
NEXT_PUBLIC_SERVER_URL: http://127.0.0.1:${HYPERDX_API_PORT}
60+
SERVER_URL: http://127.0.0.1:${HYPERDX_API_PORT}
6161
OPAMP_PORT: ${HYPERDX_OPAMP_PORT}
6262
OTEL_EXPORTER_OTLP_ENDPOINT: 'http://otel-collector:4318'
6363
OTEL_SERVICE_NAME: 'hdx-oss-app'

packages/api/src/models/team.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export interface ITeam {
1212
collectorAuthenticationEnforced: boolean;
1313
}
1414

15+
export type TeamDocument = mongoose.HydratedDocument<ITeam>;
16+
1517
export default mongoose.model<ITeam>(
1618
'Team',
1719
new Schema<ITeam>(

packages/app/.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
HYPERDX_API_KEY="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
22
HYPERDX_API_PORT=8000
33
HYPERDX_APP_PORT=8080
4-
NEXT_PUBLIC_SERVER_URL="http://localhost:${HYPERDX_API_PORT}"
4+
SERVER_URL="http://localhost:${HYPERDX_API_PORT}"
55
NODE_ENV=development
66
OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
77
OTEL_SERVICE_NAME="hdx-oss-dev-app"

packages/app/pages/api/[...all].ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default (req: NextApiRequest, res: NextApiResponse) => {
1515
changeOrigin: true,
1616
// logger: console, // DEBUG
1717
pathRewrite: { '^/api': '' },
18-
target: process.env.NEXT_PUBLIC_SERVER_URL || DEFAULT_SERVER_URL,
18+
target: process.env.SERVER_URL || DEFAULT_SERVER_URL,
1919
autoRewrite: true,
2020
// ...(IS_DEV && {
2121
// logger: console,

0 commit comments

Comments
 (0)