diff --git a/Dockerfile.uat b/Dockerfile.uat index bd0ff84..628ddc2 100644 --- a/Dockerfile.uat +++ b/Dockerfile.uat @@ -10,5 +10,8 @@ COPY . /app WORKDIR /app RUN uv sync --frozen --no-cache -# Run the application. -CMD ["/app/.venv/bin/fastapi", "run", "app/main.py", "--port", "8000", "--host", "0.0.0.0"] \ No newline at end of file +# Set PYTHONPATH to include the root directory +ENV PYTHONPATH=/app + +# Run the application using uvicorn with the correct module path +CMD ["/app/.venv/bin/uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file diff --git a/app/infrastructure/redis_client.py b/app/infrastructure/redis_client.py index 3e2e22f..57e1ad6 100644 --- a/app/infrastructure/redis_client.py +++ b/app/infrastructure/redis_client.py @@ -5,7 +5,7 @@ @lru_cache -def get_redis() -> Redis[str]: +def get_redis() -> Redis: if settings.redis_url: return Redis.from_url( settings.redis_url, diff --git a/app/main.py b/app/main.py index 51705de..183c277 100644 --- a/app/main.py +++ b/app/main.py @@ -10,7 +10,6 @@ app_dir = Path(__file__).parent sys.path.insert(0, str(app_dir)) - settings = get_settings() app = FastAPI(