Skip to content
Snippets Groups Projects
Commit 49e0b4f2 authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Install uwsgi from PyPI

No need to compile graylog support (switched to docker gelf driver).
Even to add graylog support, installation can be done using by by
passing an env variable.

JIRA INFRA-981
parent 8ad85e56
No related branches found
No related tags found
No related merge requests found
FROM python:3.7-slim as base FROM python:3.7-slim as base
# Install Python dependencies in an intermediate image # Install Python dependencies in an intermediate image
# as some requires a compiler (uwsgi) # as some requires a compiler (psycopg2)
FROM base as builder FROM base as builder
# Install dependencies required to compile some Python packages # Install dependencies required to compile some Python packages
...@@ -34,12 +34,6 @@ RUN apt-get update \ ...@@ -34,12 +34,6 @@ RUN apt-get update \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && 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 COPY requirements.txt /requirements.txt
RUN python -m venv /venv \ RUN python -m venv /venv \
&& . /venv/bin/activate \ && . /venv/bin/activate \
...@@ -55,9 +49,8 @@ RUN groupadd -r -g 1000 csi \ ...@@ -55,9 +49,8 @@ RUN groupadd -r -g 1000 csi \
&& useradd --no-log-init -r -g csi -u 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 /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! # Shall be the same as the one linked to when compiling in builder image!
RUN apt-get update \ RUN apt-get update \
&& apt-get install -yq --no-install-recommends \ && apt-get install -yq --no-install-recommends \
......
...@@ -26,3 +26,4 @@ sentry-sdk ...@@ -26,3 +26,4 @@ sentry-sdk
sqlalchemy-citext sqlalchemy-citext
sqlalchemy-continuum sqlalchemy-continuum
openpyxl openpyxl
uwsgi
...@@ -48,6 +48,7 @@ sqlalchemy-citext==1.3.post0 ...@@ -48,6 +48,7 @@ sqlalchemy-citext==1.3.post0
SQLAlchemy-Continuum==1.3.6 SQLAlchemy-Continuum==1.3.6
SQLAlchemy-Utils==0.33.8 SQLAlchemy-Utils==0.33.8
urllib3==1.24.1 urllib3==1.24.1
uwsgi==2.0.18
Werkzeug==0.14.1 Werkzeug==0.14.1
whitenoise==4.1.2 whitenoise==4.1.2
WTForms==2.1 WTForms==2.1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment