From 6192ff4081c2c4fc30c202902808a99554911831 Mon Sep 17 00:00:00 2001 From: pictuga Date: Thu, 1 Oct 2020 00:05:39 +0200 Subject: [PATCH] gunicorn with --preload To only load the code once (and start autotrim once) --- Dockerfile | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6653bac..4d944c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,4 @@ RUN apk add python3 py3-lxml py3-gunicorn py3-pip git ADD . /app RUN pip3 install /app -CMD gunicorn --bind 0.0.0.0:8080 -w 4 morss +CMD gunicorn --bind 0.0.0.0:8080 -w 4 --preload morss diff --git a/README.md b/README.md index dfaf66c..18aa1ac 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ uwsgi --http :8080 --plugin python --wsgi-file main.py #### Using Gunicorn ```shell -gunicorn morss +gunicorn --preload morss ``` #### Using docker