Skip to content

Commit 61ac9d5

Browse files
update
1 parent 2b4acba commit 61ac9d5

4 files changed

Lines changed: 40 additions & 18 deletions

File tree

docker-compose.minimal.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,6 @@ services:
2323
networks:
2424
- autoformfiller-network
2525

26-
# Dodaj prosty serwis testowy do przykładowych zapytań
27-
test-client:
28-
image: python:3.9-slim
29-
container_name: test-client
30-
volumes:
31-
- ./test-examples:/test-examples
32-
working_dir: /test-examples
33-
command: ["python", "run_examples.py"]
34-
networks:
35-
- autoformfiller-network
36-
depends_on:
37-
- llm-orchestrator
38-
3926
networks:
4027
autoformfiller-network:
4128
driver: bridge

monitor/app.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
# monitor/app.py - placeholder
1+
from flask import Flask, jsonify
22

3-
def main():
4-
print("Monitor app placeholder. Implement your monitoring logic here.")
3+
app = Flask(__name__)
4+
5+
@app.route('/health')
6+
def health():
7+
return jsonify({"status": "ok"})
58

69
if __name__ == "__main__":
7-
main()
10+
app.run(host="0.0.0.0", port=8082)

run.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,4 +378,13 @@ main() {
378378
}
379379

380380
# Run main function with arguments
381-
main "$@"
381+
main "$@"
382+
383+
# --- TEST INFRASTRUCTURE ---
384+
SCRIPT_DIR="$(dirname "$0")"
385+
if [ -f "$SCRIPT_DIR/scripts/test_infra.sh" ]; then
386+
echo "\n=== Sprawdzanie infrastruktury po starcie kontenerów ==="
387+
bash "$SCRIPT_DIR/scripts/test_infra.sh"
388+
else
389+
echo "test_infra.sh nie znaleziony, pomiń test infrastruktury."
390+
fi

scripts/test_infra.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
# Test health endpoints for all main containers
4+
set -e
5+
6+
function test_endpoint() {
7+
local name="$1"
8+
local url="$2"
9+
echo -n "Testing $name ($url)... "
10+
if curl -s --max-time 5 "$url" | grep -q 'ok'; then
11+
echo "[OK]"
12+
else
13+
echo "[FAIL]"
14+
exit 1
15+
fi
16+
}
17+
18+
test_endpoint "llm-orchestrator" "http://localhost:5000/health"
19+
# Dodaj tu kolejne testy dla innych usług, np.:
20+
# test_endpoint "browser-service" "http://localhost:5001/health"
21+
# test_endpoint "webapp" "http://localhost:8080/health"
22+
23+
echo "All infrastructure tests passed!"

0 commit comments

Comments
 (0)