Compare commits

..

3 Commits

Author SHA1 Message Date
ducoterra
f31106dd29 add venv 2020-04-24 22:06:56 -04:00
ducoterra
fbd8b0e2a7 python -m 2020-04-24 21:59:30 -04:00
Reese
b04ef5a579 Security fix: don’t run as root 2020-04-25 01:43:46 +00:00

View File

@@ -6,7 +6,13 @@ COPY api api
COPY ui ui
COPY manage.py manage.py
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
RUN python manage.py collectstatic
CMD ["gunicorn","-b",":8000", "-w", "4", "config.wsgi"]
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
CMD ["venv/bin/gunicorn","-b",":8000", "-w", "4", "config.wsgi"]