mirror of https://github.com/knative/docs.git
Update Dockerfile to use gunicorn w/ multithread (#807)
* Update Dockerfile to use gunicorn w/ multithread * Update Dockerfile * Update Dockerfile
This commit is contained in:
parent
f1279aabf7
commit
290ca7dd59
|
@ -8,11 +8,14 @@ WORKDIR $APP_HOME
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Install production dependencies.
|
# Install production dependencies.
|
||||||
RUN pip install Flask
|
RUN pip install Flask gunicorn
|
||||||
|
|
||||||
# Service must listen to $PORT environment variable.
|
# Service must listen to $PORT environment variable.
|
||||||
# This default value facilitates local development.
|
# This default value facilitates local development.
|
||||||
ENV PORT 8080
|
ENV PORT 8080
|
||||||
|
|
||||||
# Run the web service on container startup.
|
# Run the web service on container startup. Here we use the gunicorn
|
||||||
CMD ["python", "app.py"]
|
# webserver, with one worker process and 8 threads.
|
||||||
|
# For environments with multiple CPU cores, increase the number of workers
|
||||||
|
# to be equal to the cores available.
|
||||||
|
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 app:app
|
||||||
|
|
Loading…
Reference in New Issue