diff --git a/swh/storage/api/server.py b/swh/storage/api/server.py --- a/swh/storage/api/server.py +++ b/swh/storage/api/server.py @@ -243,5 +243,6 @@ app.config.update(config.read(sys.argv[1], DEFAULT_CONFIG)) - host = sys.argv[2] if len(sys.argv) >= 3 else '127.0.0.1' - app.run(host, debug=True) + host = sys.argv[2] if len(sys.argv) >= 3 else '0.0.0.0' + port = int(sys.argv[3]) if len(sys.argv) >= 4 else 5000 + app.run(host, port=port, debug=True) diff --git a/swh/storage/objstorage/api/server.py b/swh/storage/objstorage/api/server.py --- a/swh/storage/objstorage/api/server.py +++ b/swh/storage/objstorage/api/server.py @@ -65,4 +65,5 @@ app.config.update(config.read(sys.argv[1], DEFAULT_CONFIG)) host = sys.argv[2] if len(sys.argv) >= 3 else '0.0.0.0' - app.run(host, debug=True) + port = int(sys.argv[3]) if len(sys.argv) >= 4 else 5000 + app.run(host, port=port, debug=True)