From 9e2cc6486c64ce61fd672c8e148bc206c9da9f3a Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Fri, 6 Nov 2020 10:28:05 +0100
Subject: [PATCH] Add NOPAQUE_HOST and NOPAQUE_PORT variables
---
.env.tpl | 6 ++++++
web/nopaque.py | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/.env.tpl b/.env.tpl
index 0d01b60d..2c13eb3e 100644
--- a/.env.tpl
+++ b/.env.tpl
@@ -110,6 +110,12 @@ NOPAQUE_ADMIN_EMAIL_ADRESS=
# DEFAULT: localhost
# NOPAQUE_DOMAIN=
+# DEFAULT: 0.0.0.0
+# NOPAQUE_HOST=
+
+# DEFAULT: 5000
+# NOPAQUE_PORT=
+
# CHOOSE ONE: http, https
# DEFAULT: http
# NOPAQUE_PROTOCOL=
diff --git a/web/nopaque.py b/web/nopaque.py
index 8884e833..d636cfd5 100644
--- a/web/nopaque.py
+++ b/web/nopaque.py
@@ -60,4 +60,6 @@ def test():
if __name__ == '__main__':
- socketio.run(app, host='0.0.0.0')
+ host = os.environ.get('NOPAQUE_HOST', '0.0.0.0')
+ port = int(os.environ.get('NOPAQUE_PORT', '5000'))
+ socketio.run(app, host=host, port=port)