Review-Kommentare eingearbeitet

pull/38/head
Abdulrahman Dabbagh 2025-05-25 16:48:07 +02:00
parent cd6c66a1fd
commit af3eed2bdc
2 changed files with 11 additions and 8 deletions

View File

@ -1,5 +1,5 @@
# 1. Python-Image verwenden
FROM python:3.11-slim
FROM python:3.11-alpine
# 2. Arbeitsverzeichnis im Container setzen
WORKDIR /app
@ -12,4 +12,8 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# 5. Flask-App starten
CMD ["python", "app.py"]
# production-style server mit gunicorn
RUN pip install gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]

View File

@ -5,10 +5,9 @@ import os
app = Flask(__name__)
# Startseite
@app.route("/")
def hello():
return "Startseite"
@app.route("/health")
def health_check():
return "OK"
# gibt Beispiel-Konfig der Kennzahlen zurück (für die UI)
@ -22,8 +21,8 @@ def get_config():
# liefert Beispiel-Ergebnisse der Extraktion
@app.route("/dummy_results", methods=["GET"])
def get_dummy_results():
@app.route("/extraction_results", methods=["GET"])
def get_extraction_results():
results = [
{"label": "Fondname", "entity": "ABC Fonds", "page": 1, "status": "validated"},
{