fix: убрал debug=True, смягчил версии в requirements, health возвращает plain text
This commit is contained in:
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
flask>=3.0
|
flask
|
||||||
gunicorn>=22.0
|
gunicorn
|
||||||
python-docx>=1.1
|
python-docx
|
||||||
requests>=2.32
|
requests
|
||||||
|
|||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
from flask import Flask, render_template, jsonify
|
from flask import Flask, render_template
|
||||||
|
|
||||||
class ContractsApp:
|
class ContractsApp:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@@ -13,10 +13,10 @@ class ContractsApp:
|
|||||||
return render_template("index.html")
|
return render_template("index.html")
|
||||||
|
|
||||||
def health(self):
|
def health(self):
|
||||||
return jsonify({"status": "ok"})
|
return "OK", 200, {"Content-Type": "text/plain"}
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.app.run(debug=True, host="0.0.0.0", port=5000)
|
self.app.run(host="0.0.0.0", port=5000)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user