From 1916b85f2d179d60bc82185dc83ecc33ca5b3781 Mon Sep 17 00:00:00 2001 From: Xoconoch Date: Thu, 7 Aug 2025 21:15:28 -0600 Subject: [PATCH] Final fixes before release --- app.py | 20 ++++++++++++++------ requirements.txt | 4 ++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app.py b/app.py index 253979f..9c5819f 100755 --- a/app.py +++ b/app.py @@ -51,7 +51,7 @@ def setup_logging(): # Configure root logger root_logger = logging.getLogger() - root_logger.setLevel(logging.INFO) + root_logger.setLevel(logging.DEBUG) # Clear any existing handlers from the root logger if root_logger.hasHandlers(): @@ -265,14 +265,22 @@ def start_celery_workers(): if __name__ == "__main__": import uvicorn - + app = create_app() - - # Run with uvicorn + + # Use HOST environment variable if present, otherwise fall back to IPv4 wildcard + host = os.getenv("HOST", "0.0.0.0") + + # Allow overriding port via PORT env var, with default 7171 + try: + port = int(os.getenv("PORT", "7171")) + except ValueError: + port = 7171 + uvicorn.run( app, - host="${HOST:-0.0.0.0}", - port=7171, + host=host, + port=port, log_level="info", access_log=True ) diff --git a/requirements.txt b/requirements.txt index 0370eb4..6726698 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ fastapi==0.115.6 uvicorn[standard]==0.32.1 celery==5.5.3 -deezspot-spotizerr==2.2.2 +deezspot-spotizerr==2.2.3 httpx==0.28.1 bcrypt==4.2.1 PyJWT==2.10.1 python-multipart==0.0.17 -fastapi-sso==0.18.0 \ No newline at end of file +fastapi-sso==0.18.0