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. --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index ba2752a..feb423d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,9 +26,8 @@ ENV DEBUG="False" \ ACTIVATE_DEMO_PROJECT="True" \ ADMIN_PASSWORD="" \ ALLOW_PUBLIC_PROJECT_CREATION="True" \ - ACTIVATE_ADMIN_DASHBOARD="False" \ - GUNICORN_NUM_WORKERS="3" + ACTIVATE_ADMIN_DASHBOARD="False" VOLUME /database EXPOSE 8000 -CMD ["/ihatemoney/conf/confandrun.sh"] +ENTRYPOINT ["/ihatemoney/conf/confandrun.sh"] -- cgit v1.1