From d9471733f82f948e4e77ac91d6280fa5c4856358 Mon Sep 17 00:00:00 2001 From: 0livd Date: Wed, 7 Feb 2018 09:37:21 +0100 Subject: Fix some anti patterns in docker deployment (#321) - Use exec to run gunicorn and avoid creating a new process. - Add the possibility to pass any additional parameters to gunicorn. - Use only one gunicorn worker by default as the usual way to scale the app in production would be to use the scale command of the cluster scheduler. Additional workers could still be added by passing the "-w" gunicorn parameter to docker run. --- docs/installation.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/installation.rst b/docs/installation.rst index 0c3cfac..e7d586e 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -154,9 +154,10 @@ A volume can also be specified to persist the default database file:: docker run -d -p 8000:8000 -v /host/path/to/database:/database ihatemoney -The following gunicorn parameters are also available:: +Additional gunicorn parameters can be passed using the docker ``CMD`` parameter. +For example, use the following command to add more gunicorn workers:: - GUNICORN_NUM_WORKERS (default: 3) + docker run -d -p 8000:8000 ihatemoney -w 3 Configuration ============= -- cgit v1.1