Skip to content

Commit 9fffc76

Browse files
committed
add gunicorn config
1 parent f43d1b5 commit 9fffc76

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

guniconfig.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,12 @@
22
import os
33

44
bind = "%s:%s" % (os.getenv("FLASK_HOST", "0.0.0.0"), os.getenv("FLASK_PORT", 5080))
5+
6+
# Run the web service on container startup. Here we use the gunicorn
7+
# webserver, with one worker process and 8 threads.
8+
# For environments with multiple CPU cores, increase the number of workers
9+
# to be equal to the cores available.
10+
# workers = 1
11+
# threads = 8
12+
# Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.
13+
# timeout = 0

0 commit comments

Comments
 (0)