From 9577e02d7f5fb019c272c3101ba1f186f8080d80 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 14 Jun 2022 10:41:27 +0200 Subject: [PATCH] Proper configuration initialization even when the app is wrapped by uwsgi --- madblog/uwsgi.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/madblog/uwsgi.py b/madblog/uwsgi.py index 7042b21..74e906f 100644 --- a/madblog/uwsgi.py +++ b/madblog/uwsgi.py @@ -1,6 +1,11 @@ +import os + +from .cli import get_args from .config import init_config -init_config() +opts, _ = get_args() +config_file = os.path.join(opts.dir, 'config.yaml') +init_config(config_file=config_file, content_dir=opts.dir) from .app import app