Review-Kommentare eingearbeitet
parent
cd6c66a1fd
commit
af3eed2bdc
|
|
@ -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"]
|
||||
|
||||
|
|
|
|||
|
|
@ -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"},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue