anishathalye / gavel

A project expo judging system 📊
https://anishathalye.com/gavel-an-expo-judging-system/
GNU Affero General Public License v3.0
441 stars 238 forks source link

Add External Config File Options #73

Closed jhollowe closed 2 years ago

jhollowe commented 5 years ago

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.

anishathalye commented 4 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.

jhollowe commented 4 years ago

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.

anishathalye commented 4 years ago

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.

anishathalye commented 2 years ago

Thanks for the PR, but I think this is too niche of a feature and perhaps not worth the code/UI complexity.