From 8c75234d649a25f127d3945a6c6c08fc86c5be1f Mon Sep 17 00:00:00 2001 From: Dev Jaja Date: Sat, 4 Oct 2025 10:35:07 -0400 Subject: [PATCH 1/5] fix: Fix Docker setup for Veritix Python service --- Dockerfile | 2 +- README.md | 2 +- docker-compose.yml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b372f6b..c55e6f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,4 +39,4 @@ EXPOSE 8000 # Command to run the application using Uvicorn # The command format is: uvicorn [module:app_object] --host [ip] --port [port] # We use the standard uvicorn worker configuration -CMD ["python", "run.py"] +CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/README.md b/README.md index bf4ffc7..58a4dbc 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ docker compose build docker compose up -d ``` -The API will be available at `http://localhost:8000`. +The API will be available at `http://localhost:8000`. The service runs with `uvicorn src.main:app --host 0.0.0.0 --port 8000`. Health check: ```bash diff --git a/docker-compose.yml b/docker-compose.yml index 9cf74ca..1a0e5f5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: - DATABASE_URL=postgresql://veritix:veritix@db:5432/veritix ports: - "8000:8000" + command: uvicorn src.main:app --host 0.0.0.0 --port 8000 depends_on: - db From ed4747d91bee10571d6c3d6a46e0ffbac5474461 Mon Sep 17 00:00:00 2001 From: Dev Jaja Date: Sat, 4 Oct 2025 10:50:03 -0400 Subject: [PATCH 2/5] fix: build error --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 830a57a..df9c73f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ fastapi==0.115.0 uvicorn[standard]==0.30.6 -numpy==2.1.3 +numpy==1.26.4 scikit-learn==1.5.2 pydantic==2.8.2 httpx==0.28.1 From 0ffcc3e29667712294cbeca3360d6cbcae17c3f0 Mon Sep 17 00:00:00 2001 From: Dev Jaja Date: Sat, 4 Oct 2025 11:08:22 -0400 Subject: [PATCH 3/5] Fix: Update numpy and pytest-cov versions in requirements.txt for Python compatibility --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index df9c73f..cfc973f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ scikit-learn==1.5.2 pydantic==2.8.2 httpx==0.28.1 pytest==8.4.2 -pytest-cov==4.4.0 +pytest-cov requests==2.31.0 qrcode==7.4.2 Pillow==10.4.0 From 541032e95410c8913da02ffb6c8532673975658a Mon Sep 17 00:00:00 2001 From: Dev Jaja Date: Sat, 4 Oct 2025 11:13:11 -0400 Subject: [PATCH 4/5] Fix: Remove duplicate Pillow entry in requirements.txt --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index cfc973f..024524e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,5 +20,4 @@ nltk==3.8.1 reportlab==4.0.7 qrcode==7.4.2 -Pillow==10.1.0 From 50556af9c506c41e12f44ca60db0f1c852e36dd2 Mon Sep 17 00:00:00 2001 From: Dev Jaja Date: Sat, 4 Oct 2025 11:19:03 -0400 Subject: [PATCH 5/5] Fix: Remove duplicate import json from src/utils.py for build test to pass --- src/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/utils.py b/src/utils.py index 0e4488f..0c762b0 100644 --- a/src/utils.py +++ b/src/utils.py @@ -5,7 +5,6 @@ from typing import Dict, Any from typing import Tuple -import json import os import hmac import hashlib