fix: change NEXT_PUBLIC_SERVER_URL to SERVER_URL because it's not available on the frontend (#936)

This commit is contained in:
Aaron Knudtson 2025-06-23 12:30:09 -04:00 committed by GitHub
parent 1ef1ed5caa
commit d1fc0c727a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
"@hyperdx/app": patch
---
fix: change NEXT_PUBLIC_SERVER_URL to SERVER_URL

View file

@ -57,7 +57,7 @@ services:
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
MINER_API_URL: 'http://miner:5123'
MONGO_URI: 'mongodb://db:27017/hyperdx'
NEXT_PUBLIC_SERVER_URL: http://127.0.0.1:${HYPERDX_API_PORT}
SERVER_URL: http://127.0.0.1:${HYPERDX_API_PORT}
OPAMP_PORT: ${HYPERDX_OPAMP_PORT}
OTEL_EXPORTER_OTLP_ENDPOINT: 'http://otel-collector:4318'
OTEL_SERVICE_NAME: 'hdx-oss-app'

View file

@ -12,6 +12,8 @@ export interface ITeam {
collectorAuthenticationEnforced: boolean;
}
export type TeamDocument = mongoose.HydratedDocument<ITeam>;
export default mongoose.model<ITeam>(
'Team',
new Schema<ITeam>(

View file

@ -1,7 +1,7 @@
HYPERDX_API_KEY="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
HYPERDX_API_PORT=8000
HYPERDX_APP_PORT=8080
NEXT_PUBLIC_SERVER_URL="http://localhost:${HYPERDX_API_PORT}"
SERVER_URL="http://localhost:${HYPERDX_API_PORT}"
NODE_ENV=development
OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
OTEL_SERVICE_NAME="hdx-oss-dev-app"

View file

@ -15,7 +15,7 @@ export default (req: NextApiRequest, res: NextApiResponse) => {
changeOrigin: true,
// logger: console, // DEBUG
pathRewrite: { '^/api': '' },
target: process.env.NEXT_PUBLIC_SERVER_URL || DEFAULT_SERVER_URL,
target: process.env.SERVER_URL || DEFAULT_SERVER_URL,
autoRewrite: true,
// ...(IS_DEV && {
// logger: console,