Closed jhollowe closed 2 years ago
What exactly is the envisioned use case here? To me, it seems a little unusual to configure Gavel to read its config file over the network rather than using a local yaml file or using environment variables.
I found it useful to easily provision a couple of gavel instances from a unified place, as well as easily updating a config for an instance with limited interaction.
Ah I see.
I wouldn't be opposed to adding this as a feature, but I think there needs to be a better way of reporting errors to the user rather than silently failing and setting config = {}
. E.g. the user should be able to tell if the HTTP request failed, or if the YAML file failed to be parsed.
Thanks for the PR, but I think this is too niche of a feature and perhaps not worth the code/UI complexity.
Add environmental variables to enable and locate a remote file for use as the config file. Supports any publically accessible text file with proper config.yaml contents.
REMOTE_CONFIG_FILE set to true allows using a remote config file REMOTE_CONFIG_FILE_LOCATION is the URL where the remote config file can be found
Also adds try/except around all config file reads (local and remote) to prevent config file reads from crashing the app.