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

Fixed process.env.NEXT_PUBLIC_... not loaded after docker build #420

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

fomalhautb
Copy link
Contributor

@fomalhautb fomalhautb commented Feb 7, 2025


Important

Replaced direct process.env.NEXT_PUBLIC_... access with getPublicEnvVar() across the codebase and updated Docker entrypoint for environment variable handling.

  • Environment Variable Handling:
    • Introduced getPublicEnvVar() in env.tsx to access environment variables, replacing direct process.env.NEXT_PUBLIC_... access.
    • Updated sentry.client.config.ts, providers.tsx, layout.tsx, and 8 other files to use getPublicEnvVar().
  • Linting:
    • Added ESLint rule in .eslintrc.cjs to restrict direct access to process.env.NEXT_PUBLIC_*.
  • Docker:
    • Modified entrypoint.sh to replace environment variable sentinels in the dashboard build output.

This description was created by Ellipsis for a98bcb8. It will automatically update as commits are pushed.

Copy link

vercel bot commented Feb 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stack-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 8, 2025 1:31am
stack-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 8, 2025 1:31am
stack-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 8, 2025 1:31am

@fomalhautb fomalhautb changed the title fixed process.env.NEXT_PUBLIC not loaded after build fixed process.env.NEXT_PUBLIC_... not loaded after docker build Feb 7, 2025
@fomalhautb fomalhautb changed the title fixed process.env.NEXT_PUBLIC_... not loaded after docker build Fixed process.env.NEXT_PUBLIC_... not loaded after docker build Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant