From aacad89b605abc89efeb0a3b7e272f12b6a44ffd Mon Sep 17 00:00:00 2001
From: jackie / Andrea Ida Malkah Klaura <jackie@diebin.at>
Date: Sat, 10 Apr 2021 09:56:02 +0200
Subject: [PATCH] adapt Dockerfile for current aura setup

---
 Dockerfile | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index f95a8b3d..b4dcb1ac 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,11 +1,21 @@
-FROM python:3.6
+FROM python:3.8 AS base
 
-COPY requirements.txt /tmp/
+ENV PYTHONUNBUFFERED=1
 
-RUN pip install --no-cache-dir -r /tmp/requirements.txt
+WORKDIR /aura
+COPY requirements.txt .
+RUN pip install --no-cache-dir -r requirements.txt
 
-#RUN python /tmp/manage.py migrate
-#ENTRYPOINT ["/tmp/entrypoint.sh"]
+EXPOSE 8000
 
-# Superuser parameters are --username USERNAME and --email EMAIL but there is no password
-# RUN python /tmp/manage.py createsuperuser
+
+FROM base AS dev
+
+#VOLUME .
+CMD ["python", "manage.py", "runserver", "0.0.0.0:8000" ]
+
+
+FROM base AS prod
+
+COPY . .
+CMD ["sh", "-c", "gunicorn -b 0.0.0.0:8000 -w $(nproc) pv.wsgi"]
-- 
GitLab