From 1b83ff353bf86709643c671ff78a69fd9ede72a8 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 27 Apr 2020 16:57:43 -0500 Subject: Added a script for a default runner --- etc/default_settings.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/default_settings.py b/etc/default_settings.py index 75f84dc4..053b906d 100644 --- a/etc/default_settings.py +++ b/etc/default_settings.py @@ -28,6 +28,8 @@ GN_VERSION = open("../etc/VERSION","r").read() SQL_URI = "mysql://gn2:mysql_password@localhost/db_webqtl_s" SQL_ALCHEMY_POOL_RECYCLE = 3600 GN_SERVER_URL = "http://localhost:8880/" # REST API server +GN2_BASE_URL = "http://genenetwork.org/" # to pick up REST API +GN2_BRANCH_URL = GN2_BASE_URL # ---- Flask configuration (see website) TRAP_BAD_REQUEST_ERRORS = True -- cgit v1.2.3 From 0bca6569530d100291f176d04df8af9700705231 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 27 Apr 2020 17:12:54 -0500 Subject: settings: force SERVER_PORT to align with environment variable --- etc/default_settings.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/default_settings.py b/etc/default_settings.py index 053b906d..176ee59c 100644 --- a/etc/default_settings.py +++ b/etc/default_settings.py @@ -40,7 +40,13 @@ SECURITY_RECOVERABLE = True SECURITY_EMAIL_SENDER = "no-reply@genenetwork.org" SECURITY_POST_LOGIN_VIEW = "/thank_you" -SERVER_PORT = 5003 # running on localhost +# ---- SERVER_PORT needs an override before firing up the server +SERVER_PORT = os.environ['SERVER_PORT'] +if isinstance(SERVER_PORT, str): + SERVER_PORT = int(SERVER_PORT) # don't do this for other settings! +else: + SERVER_PORT = 5003 + SECRET_HMAC_CODE = '\x08\xdf\xfa\x93N\x80\xd9\\H@\\\x9f`\x98d^\xb4a;\xc6OM\x946a\xbc\xfc\x80:*\xebc' GITHUB_CLIENT_ID = "UNKNOWN" -- cgit v1.2.3