Expose it as a service.

This commit is contained in:
Tom Alexander
2021-07-24 22:20:42 -04:00
parent 35f3265659
commit 9222476444
2 changed files with 14 additions and 3 deletions

View File

@@ -1,10 +1,9 @@
import multiprocessing
import os
env_port = int(os.environ.get("PORT", 8080))
bind = f"0.0.0.0:{env_port}"
workers = max(2, multiprocessing.cpu_count() * 2 + 1)
workers = int(os.environ.get("WORKERS", 8))
preload_app = True
max_requests = 100
max_requests_jitter = 50