From d69934f816c7e48d758452dd443eca0f02dd14ce Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 11 Oct 2020 17:03:12 +0200 Subject: add landing subpage, simplify deployment --- bin/taler-merchant-demos | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'bin/taler-merchant-demos') diff --git a/bin/taler-merchant-demos b/bin/taler-merchant-demos index e4286a2..ade40cf 100755 --- a/bin/taler-merchant-demos +++ b/bin/taler-merchant-demos @@ -40,22 +40,22 @@ UWSGI_LOGFMT = "%(ltime) %(proto) %(method) %(uri) %(proto) => %(status)" # is accessed via a reverse proxy (like Nginx, for example). # # @param command line options. -def handle_serve_uwsgi(config, whichShop): - serve_uwsgi = config[whichShop]["uwsgi_serve"].value_string(required=True).lower() +def handle_serve_uwsgi(config, which_shop): + serve_uwsgi = config[which_shop]["uwsgi_serve"].value_string(required=True).lower() params = ["uwsgi", "uwsgi", "--master", "--die-on-term", "--log-format", UWSGI_LOGFMT, - "--module", "talermerchantdemos.{}:app".format(whichShop), + "--module", "talermerchantdemos.{}:app".format(which_shop), "--need-app", "--cache2", "name=paid_articles,items=500"] if serve_uwsgi == "tcp": - port = config[whichShop]["uwsgi_port"].value_int(required=True) + port = config[which_shop]["uwsgi_port"].value_int(required=True) spec = ":%d" % (port,) params.extend(["--socket", spec]) elif serve_uwsgi == "unix": - spec = config[whichShop]["uwsgi_unixpath"].value_filename(required=True) - mode = config[whichShop]["uwsgi_unixpath_mode"].value_filename(required=True) + spec = config[which_shop]["uwsgi_unixpath"].value_filename(required=True) + mode = config[which_shop]["uwsgi_unixpath_mode"].value_filename(required=True) params.extend(["--socket", spec]) params.extend(["--chmod-socket="+mode]) os.makedirs(os.path.dirname(spec), exist_ok=True) @@ -71,9 +71,9 @@ def handle_serve_uwsgi(config, whichShop): # The effect it to launch the blog HTTP service. # # @param args command line options. -def handle_serve_http(config, whichShop, port=None): +def handle_serve_http(config, which_shop, port=None): if port is None: - port = config[whichShop]["http_port"].value_int(required=True) + port = config[which_shop]["http_port"].value_int(required=True) if port is None: print("'http_port' configuration option is missing") exit(1) @@ -84,7 +84,7 @@ def handle_serve_http(config, whichShop, port=None): "--die-on-term", "--log-format", UWSGI_LOGFMT, "--http", spec, - "--module", "talermerchantdemos.{}:app".format(whichShop)) + "--module", "talermerchantdemos.{}:app".format(which_shop)) except: sys.stderr.write("Failed to start uwsgi. Please make sure to install uwsgi for Python3.") sys.exit(1) @@ -105,7 +105,7 @@ def handle_serve_from_config(config_obj, which_shop): @click.argument("which-shop") def demos(config, http_port, which_shop): """ - WHICH_SHOP is one of: blog, donations, or survey. + WHICH_SHOP is one of: blog, donations, survey or landing. """ if config: os.environ["TALER_CONFIG_FILE"] = config -- cgit v1.2.3