diff --git a/README.md b/README.md index 8a745ab..06d3d78 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ write_files: runcmd: - update-ca-certificates - pip install git+https://git.pictuga.com/pictuga/morss.git#egg=morss[full] - - gunicorn --bind 0.0.0.0:${PORT:-8000} --workers 4 --worker-class=gevent --preload --access-logfile - morss + - gunicorn --bind 0.0.0.0:${PORT:-8000} --workers ${WORKERS:-4} --worker-class=gevent --preload --access-logfile - morss ``` ## Run @@ -393,6 +393,7 @@ debugging. - `IGNORE_SSL=1`: to ignore SSL certs when fetch feeds and articles - `DELAY` (seconds) sets the browser cache delay, only for HTTP clients - `TIMEOUT` (seconds) sets the HTTP timeout when fetching rss feeds and articles +- `WORKERS` (number) sets the number of gunicorn workers to use When parsing long feeds, with a lot of items (100+), morss might take a lot of time to parse it, or might even run into a memory overflow on some shared diff --git a/docker-entry.sh b/docker-entry.sh old mode 100755 new mode 100644 index bf5c4e5..0bbf956 --- a/docker-entry.sh +++ b/docker-entry.sh @@ -4,7 +4,7 @@ if [ "$1" = "sh" ] || [ "$1" = "bash" ]; then exec $@ elif [ -z "$1" ] || [ "$@" = "run" ]; then - gunicorn --bind 0.0.0.0:${PORT:-8000} --workers 4 --worker-class=gevent --preload --access-logfile - morss + gunicorn --bind 0.0.0.0:${PORT:-8000} --workers ${WORKERS:-4} --worker-class=gevent --preload --access-logfile - morss else morss $@