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

separate parameters out of compilation #4

Open
yoursunny opened this issue Feb 16, 2023 · 1 comment
Open

separate parameters out of compilation #4

yoursunny opened this issue Feb 16, 2023 · 1 comment

Comments

@yoursunny
Copy link

Currently, both .env entries and locations.json are compiled into the program or container image.
Consequently, each installation must perform a separate compilation, and the compiled program or container image cannot be reused.

It's desirable to separate the runtime parameters out of the compiled program or container image.
Instead, the server side program reads .env and locations.json, and exposes their contents either as an HTTP endpoint that is retrieved via Fetch API, or as an embedded <script> tag on the frontpage.

This would allow the compiled program or container image to be copied between different machines without re-compiling.
Furthermore, it would enable the creation of an official Docker image of this project.

@KittensAreDaBest
Copy link
Owner

Yeah, im planning to soon change how im handling config variables. Currently the locations.json file is causing the issue of not allowing the offical Docker image since for .env.local you can just pass it through bind mounts and NextJS will just read the new .env.local instead of the one used at build runtime iirc.

Will mostly likely just have it so that the locations.json is exposed publically (eg in public) folder since nothing confidential is exposed there and then use like useSWR to fetch the data. Then this should allow for a public docker image.

Dont have the time at the moment but will get around to this in the next couple weeks.

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

No branches or pull requests

2 participants