[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: adapt config to serve via HTTP
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: adapt config to serve via HTTP |
Date: |
Fri, 11 Sep 2020 18:15:31 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new 07e7872 adapt config to serve via HTTP
07e7872 is described below
commit 07e787292eccc0a46dc1a5ca59e92b2cee82cdb3
Author: MS <ms@taler.net>
AuthorDate: Fri Sep 11 18:15:08 2020 +0200
adapt config to serve via HTTP
---
bin/taler-config-generate | 30 ++++++++++++++++++++++--------
bin/taler_urls.py | 6 +++++-
2 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/bin/taler-config-generate b/bin/taler-config-generate
index 2f55cf0..1c71892 100755
--- a/bin/taler-config-generate
+++ b/bin/taler-config-generate
@@ -66,11 +66,14 @@ def config(obj):
obj.cfg_put("paths", "TALER_DATA_HOME", "${HOME}/taler-data")
obj.cfg_put("taler", "CURRENCY", obj.currency)
obj.cfg_put("taler", "CURRENCY_ROUND_UNIT", f"{obj.currency}:0.01")
+ if obj.envname != "local":
+ obj.cfg_put("bank", "serve", "uwsgi")
+ obj.cfg_put("bank", "uwsgi_serve", "unix")
+ obj.cfg_put("bank", "uwsgi_unixpath", "$HOME/sockets/bank.uwsgi")
+ obj.cfg_put("bank", "uwsgi_unixpath_mode", "660")
+ else:
+ obj.cfg_put("bank", "http_port", get_port("bank"))
- obj.cfg_put("bank", "serve", "uwsgi")
- obj.cfg_put("bank", "uwsgi_serve", "unix")
- obj.cfg_put("bank", "uwsgi_unixpath", "$HOME/sockets/bank.uwsgi")
- obj.cfg_put("bank", "uwsgi_unixpath_mode", "660")
obj.cfg_put("bank", "database", "taler"+obj.envname)
obj.cfg_put("bank", "max_debt", "%s:500.0" % obj.currency)
obj.cfg_put("bank", "max_debt_bank", "%s:1000000000.0" % obj.currency)
@@ -104,8 +107,13 @@ def config(obj):
obj.cfg_put("backoffice-all", "uwsgi_unixpath",
"$HOME/sockets/backoffice.uwsgi")
obj.cfg_put("backoffice-all", "instances", "FSF default Tor")
- obj.cfg_put("merchant", "serve", "unix")
- obj.cfg_put("merchant", "unixpath", "$HOME/sockets/merchant.http")
+ if obj.envname != "local":
+ obj.cfg_put("merchant", "serve", "unix")
+ obj.cfg_put("merchant", "unixpath", "$HOME/sockets/merchant.http")
+ else
+ obj.cfg_put("merchant", "serve", "tcp")
+ obj.cfg_put("merchant", "port", get_port(urls["merchant_backend"]))
+
obj.cfg_put("merchant", "wire_transfer_delay", "0 s")
obj.cfg_put("merchant", "default_max_wire_fee", obj.currency + ":" +
"0.01")
obj.cfg_put("merchant", "default_max_deposit_fee", obj.currency + ":" +
"0.05")
@@ -124,8 +132,14 @@ def config(obj):
obj.cfg_put("auditor", "tiny_amount", obj.currency + ":0.01")
obj.cfg_put("exchange", "base_url", urls["exchange"])
- obj.cfg_put("exchange", "serve", "unix")
- obj.cfg_put("exchange", "unixpath", "$HOME/sockets/exchange.http")
+
+ if obj.envname != "local":
+ obj.cfg_put("exchange", "serve", "unix")
+ obj.cfg_put("exchange", "unixpath", "$HOME/sockets/exchange.http")
+ else:
+ obj.cfg_put("exchange", "serve", "tcp")
+ obj.cfg_put("exchange", "port", get_port(urls["exchange"]))
+
obj.cfg_put("exchange", "master_public_key", obj.exchange_pub)
obj.cfg_put("exchange", "terms_etag", "0")
obj.cfg_put("exchange", "terms_dir",
"$HOME/local/share/taler-exchange/tos")
diff --git a/bin/taler_urls.py b/bin/taler_urls.py
index caf9a84..6e20003 100644
--- a/bin/taler_urls.py
+++ b/bin/taler_urls.py
@@ -1,3 +1,5 @@
+from urllib.parse import urlparse
+
taler_urls = dict(
online = dict(
donations = "https://donations.{}.taler.net/",
@@ -34,4 +36,6 @@ def get_urls(envname):
for k, v in taler_urls["online"].items()
)
-
+def get_port(localhost_url):
+ parsed = urlparse(localhost_url)
+ return parsed.port
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-deployment] branch master updated: adapt config to serve via HTTP,
gnunet <=