diff --git a/tools/app_generator/app_generator.py b/tools/app_generator/app.py similarity index 100% rename from tools/app_generator/app_generator.py rename to tools/app_generator/app.py diff --git a/tools/app_generator/gunicorn.py b/tools/app_generator/gunicorn.py new file mode 100644 index 0000000000..5f8cb85312 --- /dev/null +++ b/tools/app_generator/gunicorn.py @@ -0,0 +1,14 @@ +import os + +install_dir = os.path.dirname(__file__) +command = f"{install_dir}/venv/bin/gunicorn" +pythonpath = install_dir +workers = 4 +user = "appgenerator" +bind = f"unix:{install_dir}/sock" +pid = "/run/gunicorn/appgenerator-pid" +errorlog = "/var/log/appgenerator/error.log" +accesslog = "/var/log/appgenerator/access.log" +access_log_format = '%({X-Real-IP}i)s %({X-Forwarded-For}i)s %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"' +loglevel = "warning" +capture_output = True diff --git a/tools/app_generator/requirements.txt b/tools/app_generator/requirements.txt index 0fc4fd6741..665d10bdf2 100644 --- a/tools/app_generator/requirements.txt +++ b/tools/app_generator/requirements.txt @@ -16,3 +16,4 @@ pycparser==2.21 visitor==0.1.3 Werkzeug==3.0.1 WTForms==3.0.1 +gunicorn==22.0.0