Dockerfile 760 B

12345678910111213141516171819
  1. FROM python:3
  2. ENV PYTHONUNBUFFERED 1
  3. RUN mkdir /code
  4. WORKDIR /code
  5. COPY requirements.txt /code/
  6. RUN pip install -r requirements.txt
  7. COPY vycontrol/ /code/
  8. COPY vycontrol/vycontrol/settings_example/ /code/vycontrol/settings_available/
  9. WORKDIR /code
  10. RUN python3 manage.py makemigrations config --settings=vycontrol.settings_available.production
  11. RUN python3 manage.py makemigrations --settings=vycontrol.settings_available.production
  12. RUN python3 manage.py migrate --settings=vycontrol.settings_available.production
  13. RUN python3 manage.py createcachetable --settings=vycontrol.settings_available.production
  14. EXPOSE 8000
  15. STOPSIGNAL SIGINT
  16. ENTRYPOINT ["python", "manage.py"]
  17. CMD ["runserver", "--settings=vycontrol.settings_available.production", "0.0.0.0:8000"]