File tree 9 files changed +13
-4
lines changed
9 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ ENV PYTHONUNBUFFERED 1
24
24
25
25
# Install dependencies
26
26
COPY requirements.txt .
27
- RUN pip install --no-cache-dir -r requirements.txt
27
+ RUN pip install --no-cache-dir -r requirements.txt
28
28
29
29
# Copy local code to the container image.
30
30
COPY . .
@@ -33,4 +33,5 @@ COPY . .
33
33
# webserver, with one worker process and 8 threads.
34
34
# For environments with multiple CPU cores, increase the number of workers
35
35
# to be equal to the cores available.
36
+ # Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.
36
37
CMD exec gunicorn --bind 0.0.0.0:$PORT --workers 1 --threads 8 --timeout 0 mysite.wsgi:application
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ COPY . ./
38
38
# Use gunicorn webserver with one worker process and 8 threads.
39
39
# For environments with multiple CPU cores, increase the number of workers
40
40
# to be equal to the cores available.
41
+ # Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.
41
42
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app
42
43
43
44
# [END run_broken_dockerfile]
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ RUN pip install Flask gunicorn
34
34
# webserver, with one worker process and 8 threads.
35
35
# For environments with multiple CPU cores, increase the number of workers
36
36
# to be equal to the cores available.
37
+ # Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.
37
38
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app
38
39
39
40
# [END run_helloworld_dockerfile]
Original file line number Diff line number Diff line change @@ -47,4 +47,5 @@ COPY . ./
47
47
# Use gunicorn webserver with one worker process and 8 threads.
48
48
# For environments with multiple CPU cores, increase the number of workers
49
49
# to be equal to the cores available.
50
+ # Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.
50
51
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app
Original file line number Diff line number Diff line change @@ -31,8 +31,9 @@ ENV APP_HOME /app
31
31
WORKDIR $APP_HOME
32
32
COPY . ./
33
33
34
- # Run the web service on container startup.
34
+ # Run the web service on container startup.
35
35
# Use gunicorn webserver with one worker process and 8 threads.
36
36
# For environments with multiple CPU cores, increase the number of workers
37
37
# to be equal to the cores available.
38
+ # Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.
38
39
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app
Original file line number Diff line number Diff line change @@ -31,8 +31,9 @@ ENV APP_HOME /app
31
31
WORKDIR $APP_HOME
32
32
COPY . ./
33
33
34
- # Run the web service on container startup.
34
+ # Run the web service on container startup.
35
35
# Use gunicorn webserver with one worker process and 8 threads.
36
36
# For environments with multiple CPU cores, increase the number of workers
37
37
# to be equal to the cores available.
38
+ # Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.
38
39
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app
Original file line number Diff line number Diff line change @@ -31,8 +31,9 @@ ENV APP_HOME /app
31
31
WORKDIR $APP_HOME
32
32
COPY . ./
33
33
34
- # Run the web service on container startup.
34
+ # Run the web service on container startup.
35
35
# Use gunicorn webserver with one worker process and 8 threads.
36
36
# For environments with multiple CPU cores, increase the number of workers
37
37
# to be equal to the cores available.
38
+ # Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.
38
39
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ COPY . ./
38
38
# Use gunicorn webserver with one worker process and 8 threads.
39
39
# For environments with multiple CPU cores, increase the number of workers
40
40
# to be equal to the cores available.
41
+ # Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.
41
42
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app
42
43
43
44
# [END run_pubsub_dockerfile]
Original file line number Diff line number Diff line change @@ -43,4 +43,5 @@ COPY . ./
43
43
# Use gunicorn webserver with one worker process and 8 threads.
44
44
# For environments with multiple CPU cores, increase the number of workers
45
45
# to be equal to the cores available.
46
+ # Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.
46
47
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app
You can’t perform that action at this time.
0 commit comments