diff --git a/rida.conf b/rida.conf index a0f0ac5e..f8305b95 100644 --- a/rida.conf +++ b/rida.conf @@ -9,6 +9,10 @@ pdc_insecure = True pdc_develop = True scmurls = ["git://pkgs.stg.fedoraproject.org/modules/"] +# Where we should run when running rida.py directly. +host = 127.0.0.1 +port = 5000 + # How often should we resort to polling, in seconds # Set to zero to disable polling polling_interval = 60 diff --git a/rida.py b/rida.py index ea7c2aa6..f4a34858 100755 --- a/rida.py +++ b/rida.py @@ -190,4 +190,9 @@ def _establish_ssl_context(conf): if __name__ == "__main__": logging.info("Starting Rida") ssl_ctx = _establish_ssl_context(conf) - app.run(request_handler = rida.auth.ClientCertRequestHandler, ssl_context=ssl_ctx) + app.run( + host=conf.host, + port=conf.port, + request_handler=rida.auth.ClientCertRequestHandler, + ssl_context=ssl_ctx, + ) diff --git a/rida/config.py b/rida/config.py index d717ff36..0bfbc1be 100644 --- a/rida/config.py +++ b/rida/config.py @@ -75,6 +75,9 @@ def from_file(filename=None): conf.rpms_default_cache = default.get("rpms_default_cache") conf.rpms_allow_cache = asbool(default.get("rpms_allow_cache")) + conf.port = default.get("port") + conf.host = default.get("host") + conf.ssl_certificate_file = default.get("ssl_certificate_file") conf.ssl_certificate_key_file = default.get("ssl_certificate_key_file") conf.ssl_ca_certificate_file = default.get("ssl_ca_certificate_file")