From edf5e76c7faca0fa6a620bbbac5ab7ce19715a3f Mon Sep 17 00:00:00 2001 From: Slipstream Date: Sat, 10 May 2025 22:13:37 -0600 Subject: [PATCH] as --- .env.example | 4 ++-- api_service/.env.example | 2 +- api_service/api_server.py | 4 ++-- api_service/dependencies.py | 2 +- api_service/run_api_server.py | 2 +- run_unified_api.py | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index b43fc3c..abe5d13 100644 --- a/.env.example +++ b/.env.example @@ -37,8 +37,8 @@ MOD_LOG_API_SECRET=YOUR_MOD_LOG_API_SECRET_HERE API_BASE_URL=http://127.0.0.1:5001 # Example URL for the API server # Unified API Configuration (For run_unified_api.py) -UNIFIED_API_HOST=0.0.0.0 -UNIFIED_API_PORT=5005 +API_HOST=0.0.0.0 +API_PORT=8001 # Add other necessary environment variables for your specific setup # Piston API Configuration (For GurtCog run_python_code tool) diff --git a/api_service/.env.example b/api_service/.env.example index d6bebb7..f72151e 100644 --- a/api_service/.env.example +++ b/api_service/.env.example @@ -1,6 +1,6 @@ # API Server Configuration API_HOST=0.0.0.0 -API_PORT=443 +API_PORT=8001 DATA_DIR=data # Discord OAuth Configuration diff --git a/api_service/api_server.py b/api_service/api_server.py index d4d7174..a9b005c 100644 --- a/api_service/api_server.py +++ b/api_service/api_server.py @@ -44,7 +44,7 @@ class ApiSettings(BaseSettings): # Existing API settings (if any were loaded from env before) GURT_STATS_PUSH_SECRET: Optional[str] = None API_HOST: str = "0.0.0.0" # Keep existing default if used - API_PORT: int = 443 # Keep existing default if used + API_PORT: int = 8001 # Changed default port to 8001 SSL_CERT_FILE: Optional[str] = None SSL_KEY_FILE: Optional[str] = None @@ -205,7 +205,7 @@ async def send_discord_message_via_api(channel_id: int, content: str, timeout: f "message": "Invalid content type for sending message. Must be string or dict.", "error": "invalid_content_type" } - + log.debug(f"Sending message to channel {channel_id} with data: {data}") try: diff --git a/api_service/dependencies.py b/api_service/dependencies.py index 502f4bc..22f70a4 100644 --- a/api_service/dependencies.py +++ b/api_service/dependencies.py @@ -28,7 +28,7 @@ class ApiSettings(BaseSettings): REDIS_PASSWORD: Optional[str] = None MOD_LOG_API_SECRET: Optional[str] = None API_HOST: str = "0.0.0.0" - API_PORT: int = 443 + API_PORT: int = 8001 SSL_CERT_FILE: Optional[str] = None SSL_KEY_FILE: Optional[str] = None GURT_STATS_PUSH_SECRET: Optional[str] = None diff --git a/api_service/run_api_server.py b/api_service/run_api_server.py index 7094299..703c49d 100644 --- a/api_service/run_api_server.py +++ b/api_service/run_api_server.py @@ -8,7 +8,7 @@ load_dotenv() # Get configuration from environment variables host = os.getenv("API_HOST", "0.0.0.0") -port = int(os.getenv("API_PORT", "8000")) +port = int(os.getenv("API_PORT", "8001")) data_dir = os.getenv("DATA_DIR", "data") # Create data directory if it doesn't exist diff --git a/run_unified_api.py b/run_unified_api.py index ff9c530..6e6309d 100644 --- a/run_unified_api.py +++ b/run_unified_api.py @@ -17,7 +17,7 @@ load_dotenv() # Get configuration from environment variables api_host = os.getenv("API_HOST", "0.0.0.0") -api_port = int(os.getenv("API_PORT", "443")) +api_port = int(os.getenv("API_PORT", "8001")) # Set SSL certificate paths ssl_cert = os.getenv("SSL_CERT_FILE", "/etc/letsencrypt/live/slipstreamm.dev/fullchain.pem")