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

feat: runtime variables #45

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

Conversation

manolo-battista
Copy link
Member

Description

With this update we can follow the philosophy of "Build once, deploy many", using a single builded image we can define the ENV variables on runtime.

The runtime env support is enabled by next-runtime-env package.

The env variables prefixed by NEXT_PUBLIC_ are exposed automatically on client with the window.__ENV variable.

Updated the Dockerfile with entrypoint to generate the __ENV.js file. This file is imported with script on head of the application:

<script src="/__ENV.js" />
Screenshot 2024-09-05 alle 20 19 20

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has totally checked 236 files.

Valid Invalid Ignored Fixed
145 1 90 0
Click to see the invalid file list
  • entrypoint.sh

entrypoint.sh Show resolved Hide resolved
@manolo-battista manolo-battista force-pushed the feat/runtime-variables branch 5 times, most recently from de14155 to d582822 Compare September 5, 2024 19:27
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.

2 participants