From 9bf3f20f24be938934399c2aa4c696d6ffd64099 Mon Sep 17 00:00:00 2001 From: Iurii Tatishchev Date: Thu, 8 Apr 2021 21:52:31 -0700 Subject: [PATCH] Separate dev and prod requirements --- Dockerfile | 2 +- requirements.txt | 16 +--------------- requirements/common.txt | 16 ++++++++++++++++ requirements/dev.txt | 3 +++ requirements/prod.txt | 5 +++++ 5 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 requirements/common.txt create mode 100644 requirements/dev.txt create mode 100644 requirements/prod.txt diff --git a/Dockerfile b/Dockerfile index 7f42448..59c861e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM python:3.6 COPY ./ /access_controller WORKDIR /access_controller/ -RUN pip install -r requirements.txt +RUN pip install -r requirements/prod.txt RUN python manage.py makemigrations EXPOSE 8000 COPY start.sh /var/ diff --git a/requirements.txt b/requirements.txt index 16ae562..b0c3540 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1 @@ -# Engine -Django==3.1.6 -Pillow==8.1.0 -zenpy~=2.0.24 -django_registration==3.1.1 -djangorestframework==3.12.2 -daphne==3.0.1 - - -# Documentation -Sphinx==3.4.3 -sphinx-rtd-theme==0.5.1 -sphinx-autodoc-typehints==1.11.1 -pyenchant==3.2.0 -sphinxcontrib-spelling==7.1.0 +-r requirements/dev.txt diff --git a/requirements/common.txt b/requirements/common.txt new file mode 100644 index 0000000..6b3e7fa --- /dev/null +++ b/requirements/common.txt @@ -0,0 +1,16 @@ +# Contains requirements common to all environments + +# Engine +Django==3.1.6 +Pillow==8.1.0 +zenpy~=2.0.24 +django_registration==3.1.1 +djangorestframework==3.12.2 + + +# Documentation +Sphinx==3.4.3 +sphinx-rtd-theme==0.5.1 +sphinx-autodoc-typehints==1.11.1 +pyenchant==3.2.0 +sphinxcontrib-spelling==7.1.0 diff --git a/requirements/dev.txt b/requirements/dev.txt new file mode 100644 index 0000000..73c27d0 --- /dev/null +++ b/requirements/dev.txt @@ -0,0 +1,3 @@ +# Development specific dependencies +-r common.txt + diff --git a/requirements/prod.txt b/requirements/prod.txt new file mode 100644 index 0000000..b0e6925 --- /dev/null +++ b/requirements/prod.txt @@ -0,0 +1,5 @@ +# Production specific dependencies +-r common.txt + +daphne==3.0.1 +Twisted[tls,http2]==21.2.0