Newer
Older
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV HOME /home/app
ENV APP_HOME /home/app/kszkepzes-backend
RUN groupadd app && useradd -g app app && \
mkdir -p /home/app && mkdir $APP_HOME && \
mkdir $APP_HOME/staticfiles && mkdir $APP_HOME/mediafiles
COPY ./requirements/production.txt requirements.txt
RUN apt-get -y update && apt-get install -y python python-pip python-dev python-django-extensions postgresql-client netcat
RUN pip install -r requirements.txt
COPY ./src $APP_HOME
RUN chown -R app:app $APP_HOME
USER app
CMD ["gunicorn", "kszkepzes.wsgi:application", "--bind", "0.0.0.0:8000"]