diff --git a/Dockerfile b/Dockerfile index f95a8b3d108aa9d1413b771f7a7e2a94d97686c8..b4dcb1ac71b02bbc3e907ee8af46e061a6b09f34 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"]