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

Configure using environment variables #76

Open
rwb27 opened this issue Oct 8, 2024 · 0 comments
Open

Configure using environment variables #76

rwb27 opened this issue Oct 8, 2024 · 0 comments

Comments

@rwb27
Copy link
Collaborator

rwb27 commented Oct 8, 2024

#73 introduced the ability to configure a server using a file or command line flags. However, if we're running from a server process using ASGI, rather than directly from the command line using uvicorn, we won't get command line arguments. I propose we swap the command line flags for environment variables, which can be used more reliably to set the parameters. Specifically, something like LABTHINGS_CONFIG_FILE or LABTHINGS_CONFIG_JSON would be best. It might be simpler just to force the use of a file - temp files can always be used for testing, if necessary: that was the main motivation for the ability to supply json directly.

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

1 participant