Ben 11 hónapja
szülő
commit
0b463ddecf
2 módosított fájl, 8 hozzáadás és 1 törlés
  1. 7 0
      app.py
  2. 1 1
      cloud-init.sh

+ 7 - 0
app.py

@@ -89,5 +89,12 @@ def extract():
     return convert_dto(info=info)
 
 
+@app.route("/health", methods=["GET"])
+def health():
+    return {
+        "status": 1
+    }
+
+
 if __name__ == '__main__':
     app.run(host='0.0.0.0', port=80, debug=True)

+ 1 - 1
cloud-init.sh

@@ -10,6 +10,6 @@ ssh-keygen -F hubgit.cn || ssh-keyscan hubgit.cn >~/.ssh/known_hosts
 git clone root@hubgit.cn:ben/be-ytb.git
 cd be-ytb
 apt update -y
-apt install python3-pip -y
+DEBIAN_FRONTEND=noninteractive apt install python3-pip -y
 pip3 install -r ./requirements.txt
 sh ./run.sh