From 5b055f2870967bda8d850fce56ed602580fe8ba3 Mon Sep 17 00:00:00 2001 From: OwusuBlessing Date: Wed, 18 Jun 2025 17:09:36 +0100 Subject: [PATCH 1/2] added please --- app.py | 1 + config.py | 3 +++ requirements.txt | 1 + 3 files changed, 5 insertions(+) diff --git a/app.py b/app.py index cf8d2ca..c7ae3fd 100644 --- a/app.py +++ b/app.py @@ -116,6 +116,7 @@ async def get_api_key(api_key_header: str = Security(api_key_header)) -> str: ) token = api_key_header.split(' ')[1] + print(f"Token : {token}") if token != API_KEY: raise HTTPException( status_code=401, diff --git a/config.py b/config.py index fb72445..4a3aecf 100644 --- a/config.py +++ b/config.py @@ -1,4 +1,7 @@ import os +from dotenv import load_dotenv + +load_dotenv() QUIZ_TYPES = { 1: { "name": "Single Line Text Inputs", diff --git a/requirements.txt b/requirements.txt index d4a7178..38f86a5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,5 +26,6 @@ python-docx==1.1.2 unstructured==0.17.2 pypdf==5.4.0 gunicorn==23.0.0 +python-dotenv From 60d2368be95b750cfbe0fe54469e0f8b31d22e5a Mon Sep 17 00:00:00 2001 From: OwusuBlessing Date: Wed, 18 Jun 2025 17:15:19 +0100 Subject: [PATCH 2/2] added --- server_deploy.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/server_deploy.sh b/server_deploy.sh index eacbbaa..f250d03 100755 --- a/server_deploy.sh +++ b/server_deploy.sh @@ -3,7 +3,7 @@ # Configuration REPO_URL="http://owusu:890eccfcea010beb94a0adba246aaf9258330b70@23.29.118.76:3000/owusu/ds-fire-fighter.git" APP_DIR="/home/ec2-user/ds-fire-fighter" -BRANCH="main" +BRANCH="dev" PYTHON_VERSION="3.11" WORKERS=4 THREADS=2 @@ -117,7 +117,18 @@ backlog = 2048 # Worker processes workers = ${WORKERS} -worker_class = "uvicorn.workers.UvicornWorker" +worker_class = SEGMIND_API_KEY="SG_28b00087ea064e64" +IMAGEKIT_PRIVATE_KEY="private_BXnyXGjdhBpBs/sU7avdyLwPx1o=" +IMAGEKIT_PUBLIC_KEY="public_hb1iwGN/UWT+aYg9mMkUQNeFh40=" +IMAGEKIT_URL_ENDPOINT="6pxd8st0ugi" +DEEPAI_API_KEY = "67768bbb-b946-400d-8188-ca21b0506ed8" +HEDRA_API_KEY ="sk_hedra_0MeJTqGmZnyt_jAXboOvXUGACTeeGAFuqpjuDU7ZVy5WOkSsM6B9kDe_vI_Dhcnn" +API_KEY_ACCESS = "face_forge_sk_test_51NxYz8KJh2LmPqR3vW4tU5w6X7y8Z9A0B1C2D3E4F5G6H7I8J9K0L1M2N3O4P5Q6R7S8T9U0V1W2X3Y4Z" +PORT=5000 + + + + worker_connections = 1000 timeout = ${TIMEOUT} keepalive = 2