From 664273d058d0952297f079c7725501c10e0a9e03 Mon Sep 17 00:00:00 2001 From: "Justin W. Flory" Date: Thu, 12 Dec 2019 20:18:15 -0500 Subject: [PATCH] :unicorn: containers: Change entrypoint to use Gunicorn (closes #250) This commit changes the entrypoints on the Dockerfiles to use `gunicorn` instead of the Django debug server. I was able to switch it for both development and production since Gunicorn is fairly simple. For development, I included a setting that automatically reloads Gunicorn if files change on disk. This is a setting intended for local development, such as when we have container volumes with docker-compose. Also, I have waited a long time to have a semi-valid excuse to use the :unicorn: emoji. Closes #250. Signed-off-by: Justin W. Flory --- Dockerfile | 2 +- Dockerfile.production | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a265c31a..42a5890e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,4 @@ COPY . /app EXPOSE 8000 -CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] +CMD ["gunicorn", "--reload", "grasa_event_locator.wsgi"] diff --git a/Dockerfile.production b/Dockerfile.production index 2cedc6b3..bc2534e1 100644 --- a/Dockerfile.production +++ b/Dockerfile.production @@ -19,4 +19,4 @@ COPY . /app EXPOSE 8000 -CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] +CMD ["gunicorn", "grasa_event_locator.wsgi"]