diff --git a/src/django/Dockerfile b/src/django/Dockerfile index 8aecbccb..dd78ddfa 100644 --- a/src/django/Dockerfile +++ b/src/django/Dockerfile @@ -6,12 +6,21 @@ FROM python:3.10-slim-bullseye WORKDIR /usr/src COPY requirements.txt /tmp/ -ARG buildDeps=" build-essential libpq-dev" -ARG deps=" gdal-bin libgdal-dev gettext postgresql-client" - -RUN apt-get update && apt-get install -y $buildDeps $deps --no-install-recommends -RUN pip3 install --no-cache-dir -r /tmp/requirements.txt -RUN apt-get purge -y --auto-remove $buildDeps +RUN set -ex \ + && buildDeps=" \ + build-essential \ + libpq-dev \ + " \ + && deps=" \ + gdal-bin \ + libgdal-dev \ + gettext \ + postgresql-client-13 \ + " \ + && apt-get update && apt-get install -y $buildDeps $deps --no-install-recommends \ + && pip install --no-cache-dir -r /tmp/requirements.txt \ + && apt-get purge -y --auto-remove $buildDeps \ + && rm -rf /tmp/requirements.txt /var/lib/apt/lists/* COPY . /usr/src diff --git a/src/django/gunicorn.conf.py b/src/django/gunicorn.conf.py index fb185b31..ce81cb2c 100644 --- a/src/django/gunicorn.conf.py +++ b/src/django/gunicorn.conf.py @@ -4,6 +4,7 @@ accesslog = "-" errorlog = "-" workers = 3 +worker_class = 'gevent' loglevel = "Info" ENVIRONMENT = os.getenv("DJANGO_ENV", "dev")