diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-11-25 09:13:11 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-11-25 09:13:11 +0100 |
commit | b7a8611707d393abd6857c8f7986f66a1ea906ab (patch) | |
tree | e6c56cfa503b3c78229bc5206370721dda77a25c /hydrilla-wsgi.py | |
parent | 28ba79385cd1b80a99629d35bd535adc5f817497 (diff) | |
download | koszko-org-server-b7a8611707d393abd6857c8f7986f66a1ea906ab.tar.gz koszko-org-server-b7a8611707d393abd6857c8f7986f66a1ea906ab.zip |
add hydrilla.koszko.org virtualhost
Diffstat (limited to 'hydrilla-wsgi.py')
-rw-r--r-- | hydrilla-wsgi.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/hydrilla-wsgi.py b/hydrilla-wsgi.py new file mode 100644 index 0000000..45ec248 --- /dev/null +++ b/hydrilla-wsgi.py @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: CC0-1.0 + +# Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org> +# +# Available under the terms of Creative Commons Zero v1.0 Universal. + +import sys + +_application = None + +def application(environ, *args): + global _application + + if _application is None: + sys.path.extend(environ['HYDRILLA_GUIX_PYTHONPATH'].split(':')) + + from hydrilla.server import start_wsgi, config + + current_config = { + **config.load(), + 'malcontent_dir': environ['MALCONENT_DIR'] + } + + _application = start_wsgi(standalone_mode=False, obj=current_config) + + return _application(environ, *args) |