Dockerfile 441 B

123456789101112131415161718192021
  1. FROM python:3.6
  2. LABEL maintainer="{{ project_name }}"
  3. ENV PYTHONUNBUFFERED 1
  4. ENV DJANGO_ENV dev
  5. COPY ./requirements.txt /code/requirements.txt
  6. RUN pip install -r /code/requirements.txt
  7. RUN pip install gunicorn
  8. COPY . /code/
  9. WORKDIR /code/
  10. RUN python manage.py migrate
  11. RUN useradd coderedcms
  12. RUN chown -R coderedcms /code
  13. USER coderedcms
  14. EXPOSE 8000
  15. CMD exec gunicorn {{ project_name }}.wsgi:application --bind 0.0.0.0:8000 --workers 3