gunicorn issue
This commit is contained in:
@@ -151,7 +151,7 @@ WorkingDirectory=/srv/fasthue
|
||||
Environment=FASTHUE_SECRETS_FILE=/etc/fasthue/secrets.yaml
|
||||
RuntimeDirectory=fasthue
|
||||
RuntimeDirectoryMode=0750
|
||||
ExecStart=/srv/fasthue/.venv/bin/gunicorn --workers 1 --umask 007 --bind unix:/run/fasthue/fasthue.sock --factory app:create_gunicorn_app
|
||||
ExecStart=/srv/fasthue/.venv/bin/gunicorn --workers 1 --umask 007 --bind unix:/run/fasthue/fasthue.sock app:gunicorn_app
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
|
||||
|
||||
@@ -234,6 +234,12 @@ def create_gunicorn_app() -> Flask:
|
||||
return create_app(config_path, verify_tls, api_key, configured_url_prefix())
|
||||
|
||||
|
||||
# Older Gunicorn releases do not support --factory. Expose a WSGI callable at
|
||||
# import time so they can load this application with `app:gunicorn_app`.
|
||||
if __name__ != "__main__":
|
||||
gunicorn_app = create_gunicorn_app()
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--config", type=Path, default=ROOT / "hue.yaml", help="Dashboard YAML file")
|
||||
|
||||
Reference in New Issue
Block a user