[Question]: Support specifying a custom .env file for lightrag-server (e.g. --env-file flag)
Do you need to ask a question?
- I have searched the existing question and discussions and this question is not already answered.
- I believe this is a legitimate question, not just a bug or feature request.
Your Question
Is it possible to specify which environment file the lightrag-server command should use? If I understand correctly, it always loads configuration from the file named .env.
Additional Context
Since LightRAG does not yet support multiple workspaces, we currently deploy separate LightRAG instances to achieve data isolation (see issue https://github.com/HKUDS/LightRAG/issues/2527).
We have 5 independent LightRAG deployments, each connected to its own PostgreSQL database. The configuration for each deployment is stored in a dedicated environment file (for example, .env-deployment-a, .env-deployment-b, etc.).
At the moment, before starting a deployment, we have to copy the corresponding environment file to .env so that lightrag-server picks it up.
It would be much more convenient if lightrag-server supported an argument such as:
lightrag-server --env-file .env-deployment-aThis would allow running multiple deployments with different configurations without having to rename or copy environment files.
Is there already a way to achieve this, or would this need to be implemented as a new feature?
Source: HKUDS/LightRAG