Update Dockerfile

This commit is contained in:
Reese
2020-04-25 02:32:06 +00:00
parent 8404d43222
commit a70aa8840f

View File

@@ -6,13 +6,12 @@ COPY api api
COPY ui ui
COPY manage.py manage.py
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
RUN useradd -ms /bin/bash django
RUN chown -R django .
USER django
RUN python -m venv venv
RUN venv/bin/pip install -r requirements.txt
RUN venv/bin/python manage.py collectstatic
RUN python manage.py collectstatic
CMD ["venv/bin/gunicorn","-b",":8000", "-w", "4", "config.wsgi"]
CMD ["gunicorn","-b",":8000", "-w", "4", "config.wsgi"]