pbio-site/run.py
2025-04-19 12:17:00 +00:00

21 lines
382 B
Python

import sys
import subprocess
port = 5000
def run_with_gunicorn():
port = 5000
cmd = [
sys.executable, "-m", "gunicorn",
"app:app",
"--workers", "1",
"--log-level", "error",
"--bind", f"0.0.0.0:{port}"
]
print(f"Starting Gunicorn on port {port}")
subprocess.run(cmd)
if __name__ == "__main__":
run_with_gunicorn()