diff --git a/Dockerfile b/Dockerfile index b56b40ad60e36cad9ecdf8684f0bd08518ea9881..6aac4d1582c3ff3a675754ceee301357bd07525c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM python:3.7-slim as base # Install Python dependencies in an intermediate image -# as some requires a compiler (uwsgi) +# as some requires a compiler (psycopg2) FROM base as builder # Install dependencies required to compile some Python packages @@ -34,12 +34,6 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# Compile uwsgi with graylog2 plugin -RUN wget https://projects.unbit.it/downloads/uwsgi-2.0.17.1.tar.gz \ - && tar xfz uwsgi-2.0.17.1.tar.gz \ - && cd uwsgi-2.0.17.1 \ - && UWSGI_EMBED_PLUGINS=graylog2,zabbix python uwsgiconfig.py --build - COPY requirements.txt /requirements.txt RUN python -m venv /venv \ && . /venv/bin/activate \ @@ -55,9 +49,8 @@ RUN groupadd -r -g 1000 csi \ && useradd --no-log-init -r -g csi -u 1000 csi COPY --chown=csi:csi --from=builder /venv /venv -COPY --chown=csi:csi --from=builder /uwsgi-2.0.17.1/uwsgi /venv/bin/uwsgi -# Install libraries for psycopg2, pillow and uwsgi +# Install libraries for psycopg2 and pillow # Shall be the same as the one linked to when compiling in builder image! RUN apt-get update \ && apt-get install -yq --no-install-recommends \ diff --git a/requirements-to-freeze.txt b/requirements-to-freeze.txt index 316750d3abb71f608446491f543d4cffa8346eb9..4b80a1dcc20eb03482058d237e7c3a9246767344 100644 --- a/requirements-to-freeze.txt +++ b/requirements-to-freeze.txt @@ -26,3 +26,4 @@ sentry-sdk sqlalchemy-citext sqlalchemy-continuum openpyxl +uwsgi diff --git a/requirements.txt b/requirements.txt index 14e395ebd384bb3a9e7fd9e26edb6c72e6eb0e4f..723874860fd344a2c60f2006b1dbe3237636eedd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -48,6 +48,7 @@ sqlalchemy-citext==1.3.post0 SQLAlchemy-Continuum==1.3.6 SQLAlchemy-Utils==0.33.8 urllib3==1.24.1 +uwsgi==2.0.18 Werkzeug==0.14.1 whitenoise==4.1.2 WTForms==2.1