SlideRuleEarth / sliderule

Server and client framework for on-demand science data processing in the cloud
https://slideruleearth.io
Other
27 stars 12 forks source link

Rework environment variables so that they become runtime configuration #56

Open jpswinski opened 3 years ago

jpswinski commented 3 years ago

SlideRule uses a couple environment variables for configuration due to the fact that they are needed at package initialization which occurs before the lua interpreter is up and running.

The current list is:

IPV4 - for the local host ip address used in events SLIDERULE_S3_ENDPOINT - for S3Lib s3 endpoint SLIDERULE_S3_REGION - for S3Lib s3 region

jpswinski commented 2 years ago

ORCHESTRATOR is also now used for the ip address of the orchestrator

jpswinski commented 2 years ago

I think the best solution is to continue to use environment variables when necessary, but to limit them to only be read from the start up Lua script. For instance, only server.lua should read environment variables, after which all configuration is managed from Lua.