diff --git a/WebHost.py b/WebHost.py index 08ef3c430795..e597de24763d 100644 --- a/WebHost.py +++ b/WebHost.py @@ -1,3 +1,4 @@ +import argparse import os import multiprocessing import logging @@ -31,6 +32,15 @@ def get_app() -> "Flask": import yaml app.config.from_file(configpath, yaml.safe_load) logging.info(f"Updated config from {configpath}") + # inside get_app() so it's usable in systems like gunicorn, which do not run WebHost.py, but import it. + parser = argparse.ArgumentParser() + parser.add_argument('--config_override', default=None, + help="Path to yaml config file that overrules config.yaml.") + args = parser.parse_known_args()[0] + if args.config_override: + import yaml + app.config.from_file(os.path.abspath(args.config_override), yaml.safe_load) + logging.info(f"Updated config from {args.config_override}") if not app.config["HOST_ADDRESS"]: logging.info("Getting public IP, as HOST_ADDRESS is empty.") app.config["HOST_ADDRESS"] = Utils.get_public_ipv4() diff --git a/WebHostLib/requirements.txt b/WebHostLib/requirements.txt index c61a153d24e0..c593cd63df7e 100644 --- a/WebHostLib/requirements.txt +++ b/WebHostLib/requirements.txt @@ -1,10 +1,11 @@ flask>=3.0.3 -werkzeug>=3.0.3 -pony>=0.7.18 +werkzeug>=3.0.4 +pony>=0.7.19 waitress>=3.0.0 Flask-Caching>=2.3.0 Flask-Compress>=1.15 -Flask-Limiter>=3.7.0 +Flask-Limiter>=3.8.0 bokeh>=3.1.1; python_version <= '3.8' -bokeh>=3.4.1; python_version >= '3.9' +bokeh>=3.4.3; python_version == '3.9' +bokeh>=3.5.2; python_version >= '3.10' markupsafe>=2.1.5 diff --git a/requirements.txt b/requirements.txt index db4f5445036a..6fe14c9f32ce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,14 @@ colorama>=0.4.6 -websockets>=12.0 -PyYAML>=6.0.1 -jellyfish>=1.0.3 +websockets>=13.0.1 +PyYAML>=6.0.2 +jellyfish>=1.1.0 jinja2>=3.1.4 schema>=0.7.7 kivy>=2.3.0 bsdiff4>=1.2.4 platformdirs>=4.2.2 -certifi>=2024.6.2 -cython>=3.0.10 +certifi>=2024.8.30 +cython>=3.0.11 cymem>=2.0.8 -orjson>=3.10.3 -typing_extensions>=4.12.1 +orjson>=3.10.7 +typing_extensions>=4.12.2