From 875d6efe9cfc108fc38d226fa19cdb288726f59b Mon Sep 17 00:00:00 2001 From: ElectroFloat <477252+electrofloat@users.noreply.github.com> Date: Sun, 26 Mar 2023 19:13:45 +0200 Subject: [PATCH] Add STORJ_EXPORTER_ADDRESS to be able to bind to specific address --- storj_exporter/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storj_exporter/__main__.py b/storj_exporter/__main__.py index 28e5d28..ac68e1d 100644 --- a/storj_exporter/__main__.py +++ b/storj_exporter/__main__.py @@ -65,6 +65,7 @@ def main(): """Read in environment variables""" storj_host_address = os.environ.get('STORJ_HOST_ADDRESS', '127.0.0.1') storj_api_port = os.environ.get('STORJ_API_PORT', '14002') + storj_exporter_address = os.environ.get('STORJ_EXPORTER_ADDRESS', '') storj_exporter_port = int(os.environ.get('STORJ_EXPORTER_PORT', '9651')) storj_collectors = os.environ.get('STORJ_COLLECTORS', 'payout sat').split() log_level = os.environ.get('STORJ_EXPORTER_LOG_LEVEL', 'INFO').upper() @@ -95,7 +96,7 @@ def main(): logger.info('Registering sat collector') REGISTRY.register(sat_collector) - start_wsgi_server(storj_exporter_port, '') + start_wsgi_server(storj_exporter_port, storj_exporter_address) if __name__ == '__main__':