hyperdx icon indicating copy to clipboard operation
hyperdx copied to clipboard

Move SERVER_URL to a nextjs runtime config.

Open julionav opened this issue 1 year ago • 2 comments

Problem

Currently, Changing the SERVER_URL requires to rebuild the frontend app image, and push it to a container registry.

This isn't usually a problem for a client application, but for one that some folks are self hosting it can cause problems and confusion at the moment of setup

Solution

Move the config value to a runtime config value. This feature is technically deprecated by nextjs in favor of using their "new" App Router system, but hyperdx isn't using it and it will require a good amount of work to migrate it.

The main issue for this feature seems to be that Automatic Static Optimization, Output File Tracing, or React Server Components don't work with this, which may be a problem. Although I don't see hyperdx needing those features. This is an app that is behind a login, where the bottleneck isn't "rendering" but the query speed to clickhouse.

julionav avatar Sep 20 '24 13:09 julionav

⚠️ No Changeset found

Latest commit: a14d788f53c22e75595ac494d547883836296554

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Sep 20 '24 13:09 changeset-bot[bot]

This is great - you're right we don't really leverage any of those features (and as you point out there's no reason we'll consider them any time soon). The only issue might be standalone builds where (understandably) this does not work. We actually do build a standalone for the local mode docker container - but that's a different build path and has its own solution so that's okay.

MikeShi42 avatar Oct 11 '24 05:10 MikeShi42