move docker compose back to categorisation directory and define simple invoke script

This commit is contained in:
Daniel Roth 2026-02-18 16:12:23 +00:00
parent b4e3dc9f42
commit 478947b8da
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,11 @@
version: "3.9"
services:
categorisation-lambda:
build:
context: ../../../
dockerfile: backend/categorisation/handler/Dockerfile
ports:
- "9000:8080"
env_file:
- ../../../.env

View file

@ -0,0 +1,25 @@
#!/usr/bin/env python3
import json
import requests
LAMBDA_URL = "http://localhost:9000/2015-03-31/functions/function/invocations"
payload = {
"Records": [
{
"body": json.dumps(
{
"portfolio_id": 556,
"plans_to_consider": [],
"plan_priority_order": [],
}
)
}
]
}
response = requests.post(LAMBDA_URL, json=payload)
print("Status code:", response.status_code)
print("Response:")
print(response.text)