diff --git a/Procfile b/Procfile new file mode 100644 index 00000000..4bcf3206 --- /dev/null +++ b/Procfile @@ -0,0 +1,2 @@ +web: python -m gunicorn -k uvicorn.workers.UvicornWorker -c pr_agent/servers/gunicorn_config.py --forwarded-allow-ips "*" pr_agent.servers.github_app:app + diff --git a/pr_agent/servers/gunicorn_config.py b/pr_agent/servers/gunicorn_config.py index 1b4034bf..c4b0d335 100644 --- a/pr_agent/servers/gunicorn_config.py +++ b/pr_agent/servers/gunicorn_config.py @@ -24,7 +24,9 @@ import os # # bind = '0.0.0.0:5000' -bind = '0.0.0.0:3000' +# Use Heroku's PORT env var if available, otherwise default to 3000 +port = int(os.getenv('PORT', '3000')) +bind = f'0.0.0.0:{port}' backlog = 2048 # diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 00000000..51a25b56 --- /dev/null +++ b/runtime.txt @@ -0,0 +1,2 @@ +python-3.12.10 +