From ece2054c7e302d4748029e7d5e416dc5ccbd6977 Mon Sep 17 00:00:00 2001
From: Dominik George <dominik.george@teckids.org>
Date: Thu, 14 Nov 2019 14:40:21 +0100
Subject: [PATCH] DO not use a venv inside docker.

---
 Dockerfile           | 9 ++++-----
 docker/entrypoint.sh | 4 +---
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index c1b0ee01a..f88c595b5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -36,14 +36,13 @@ COPY . /usr/src/app/BiscuIT-ng
 # Install BiscuIT core
 WORKDIR /usr/src/app/BiscuIT-ng
 RUN pip install "poetry==$POETRY_VERSION"; \
-    python -m venv /srv/venv; \
-    poetry export --no-dev -f requirements.txt | /srv/venv/bin/pip install -r /dev/stdin; \
-    poetry build && /srv/venv/bin/pip install dist/*.whl
+    poetry export -f requirements.txt | pip install -r /dev/stdin; \
+    poetry build && pip install dist/*.whl
 
 # Build messages and assets
 RUN mkdir /etc/biscuit /srv/media /srv/static /var/backups/biscuit; \
-    /srv/venv/bin/python manage.py compilemessages; \
-    /srv/venv/bin/python manage.py collectstatic --no-input --clear
+    python manage.py compilemessages; \
+    python manage.py collectstatic --no-input --clear
 
 # Clean up build dependencies
 RUN apt-get remove --purge -y \
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 62286bff6..a9c50f1c6 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -24,9 +24,7 @@ while ! nc -z $BISCUIT_database__host $BISCUIT_database__port; do
     sleep 0.1
 done
 
-source /srv/venv/bin/activate
-
 python manage.py flush --no-input
 python manage.py migrate
 
-exec /srv/venv/bin/gunicorn biscuit.core.wsgi --bind ${GUNICORN_BIND}
+exec gunicorn biscuit.core.wsgi --bind ${GUNICORN_BIND}
-- 
GitLab