envelope/docker/prod/Dockerfile

21 lines
439 B
Docker

# syntax=docker/dockerfile:1
FROM python:3
RUN useradd -d /code xf
RUN mkdir /code
RUN chown xf:xf /code
RUN mkdir /conf
RUN chown xf:xf /conf
RUN mkdir /venv
RUN chown xf:xf /venv
USER xf
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /code
COPY requirements.prod.txt /code/
RUN python -m venv /venv
RUN . /venv/bin/activate && pip install -r requirements.prod.txt
CMD . /venv/bin/activate && uwsgi --ini /conf/uwsgi.ini