add prod web deployment

This commit is contained in:
2026-04-04 15:49:22 +02:00
parent e1745841b1
commit 84e5656ca0
2 changed files with 7 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ pkgs.mkShell {
beautifulsoup4
flask
lxml
waitress
]))
pkgs.claude-code
];

View File

@@ -8,6 +8,7 @@ import os
from flask import Flask, render_template, g
DB_PATH = os.environ.get("DB_PATH", "/data/huizenbot.db")
APP_ENV = os.environ.get("APP_ENV", "dev")
app = Flask(__name__)
@@ -57,4 +58,8 @@ def index():
if __name__ == "__main__":
app.run(debug=True, host="0.0.0.0", port=5000)
if APP_ENV == "dev":
app.run(debug=True, host="0.0.0.0", port=5000)
else:
from waitress import serve
serve(app, host="0.0.0.0", port=5000)