Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(wren-ui): Fix Posthog related env in client #246

Merged
merged 2 commits into from
May 14, 2024
Merged

fix(wren-ui): Fix Posthog related env in client #246

merged 2 commits into from
May 14, 2024

Conversation

andreashimin
Copy link
Contributor

@andreashimin andreashimin commented May 14, 2024

Description

By design, Nextjs client side cannot receive runtime env, the NEXT_PUBLIC env will be converted to frozen value, so we need to provide env at the build time.

If you build and deploy a single Docker image to multiple environments, all NEXT_PUBLIC_ variables will be frozen with the value evaluated at build time, so these values need to be set appropriately when the project is built.

As an alternative, add an API to retrieve the user option from the backend such as telemetry enabling

Copy link
Member

@wwwy3y3 wwwy3y3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on backend

Copy link
Contributor

@onlyjackfrost onlyjackfrost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as well

@wwwy3y3 wwwy3y3 merged commit 1aadc9a into main May 14, 2024
2 checks passed
@wwwy3y3 wwwy3y3 deleted the fix/env branch May 14, 2024 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants