diff --git a/README.rst b/README.rst index 6e98da7..b816cea 100644 --- a/README.rst +++ b/README.rst @@ -96,6 +96,10 @@ need to change this. ``HOST_OVERRIDE``: (optional) Used to override the base URL if the app is unaware. Useful when running behind reverse proxies like an identity-aware SSO. Example: ``sub.domain.com`` +``SNAPPASS_BIND_ADDRESS``: (optional) Used to override the default bind address of 0.0.0.0 for flask app Example: ``127.0.0.1`` + +``SNAPPASS_PORT``: (optional) Used to override the default port of 5000 Example: ``6000`` + APIs ---- diff --git a/snappass/main.py b/snappass/main.py index 6f06572..2c16cdc 100644 --- a/snappass/main.py +++ b/snappass/main.py @@ -353,7 +353,8 @@ def health_check(): @check_redis_alive def main(): - app.run(host='0.0.0.0') + app.run(host=os.environ.get('SNAPPASS_BIND_ADDRESS', '0.0.0.0'), + port=os.environ.get('SNAPPASS_PORT', 5000)) if __name__ == '__main__':