File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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-
3926networks :
4027 autoformfiller-network :
4128 driver : bridge
Original file line number Diff line number Diff line change 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
69if __name__ == "__main__" :
7- main ( )
10+ app . run ( host = "0.0.0.0" , port = 8082 )
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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!"
You can’t perform that action at this time.
0 commit comments