Self hosted FLOSS fitness/workout, nutrition and weight tracker
Cleanup requirements files
Roland Geider96b1f5027456
diff --git a/.travis.yml b/.travis.ymlindex 243260206..e0b8d4e67 100644--- a/.travis.yml+++ b/.travis.yml@@ -27,7 +27,7 @@ env:# Install the applicationinstall:# Install requirements- - pip install -r requirements_devel.txt+ - pip install -r requirements_dev.txt- python setup.py develop- cd wger- if [[ "$DB" = "postgresql" ]]; then pip install psycopg2; fidiff --git a/MANIFEST.in b/MANIFEST.inindex 69dc7c1fa..b29980052 100644--- a/MANIFEST.in+++ b/MANIFEST.in@@ -4,7 +4,7 @@ include AUTHORS.txtinclude AGPL.txtinclude CC-BY-SA.txtinclude requirements.txt-include requirements_devel.txt+include requirements_dev.txt# Application folder as well as extrasrecursive-include extras *.*diff --git a/docs/development.rst b/docs/development.rstindex 967108a51..6da84fdfb 100644--- a/docs/development.rst+++ b/docs/development.rst@@ -26,7 +26,7 @@ Install Requirements~~~~~~~~~~~~~~~~~~~~::- $ pip install -r requirements_devel.txt+ $ pip install -r requirements_dev.txt$ npm install -g yarn sass$ python setup.py developdiff --git a/extras/docker/apache/Dockerfile b/extras/docker/apache/Dockerfileindex 7301c59f5..5b8183bfb 100644--- a/extras/docker/apache/Dockerfile+++ b/extras/docker/apache/Dockerfile@@ -31,7 +31,7 @@ RUN apt-get update \# Set up the applicationCOPY requirements* ./-RUN pip3 wheel --no-cache-dir --wheel-dir /usr/src/app/wheels -r requirements_devel.txt+RUN pip3 wheel --no-cache-dir --wheel-dir /usr/src/app/wheels -r requirements_dev.txt########diff --git a/extras/docker/development-venv/Dockerfile b/extras/docker/development-venv/Dockerfileindex 341e9406c..87164343b 100644--- a/extras/docker/development-venv/Dockerfile+++ b/extras/docker/development-venv/Dockerfile@@ -43,7 +43,7 @@ RUN apt-get update \# Set up the applicationCOPY . .RUN pip3 install wheel \- && pip3 wheel --no-cache-dir --wheel-dir /usr/src/app/wheels -r requirements_devel.txt+ && pip3 wheel --no-cache-dir --wheel-dir /usr/src/app/wheels -r requirements_dev.txt########diff --git a/extras/docker/development/Dockerfile b/extras/docker/development/Dockerfileindex cc59f6f65..705dd2f9e 100644--- a/extras/docker/development/Dockerfile+++ b/extras/docker/development/Dockerfile@@ -25,7 +25,7 @@ RUN apt-get update \# Build the necessary python wheelsCOPY requirements* ./-RUN pip3 wheel --no-cache-dir --wheel-dir /wheels -r requirements_devel.txt+RUN pip3 wheel --no-cache-dir --wheel-dir /wheels -r requirements_prod.txt@@ -47,14 +47,13 @@ COPY ${DOCKER_DIR}/settings.py /tmp/COPY ${DOCKER_DIR}/entrypoint.sh /home/wger/entrypoint.shRUN chmod +x /home/wger/entrypoint.shRUN pip3 install --no-cache /wheels/* \- && pip3 install psycopg2-binary \- && pip3 install django-redis \&& python3 setup.py developRUN chown -R wger:wger .USER wgerRUN mkdir ~/media \+ && mkdir ~/static \&& mkdir ~/db/CMD ["/home/wger/entrypoint.sh"]diff --git a/extras/docker/development/entrypoint.sh b/extras/docker/development/entrypoint.shindex 4a7f45994..58a9202ee 100644--- a/extras/docker/development/entrypoint.sh+++ b/extras/docker/development/entrypoint.sh@@ -25,5 +25,12 @@ thenchmod -R g+w ~wger/mediafi-# Run the development server-python3 manage.py runserver 0.0.0.0:8000+# Run the server+if [ -z "$WGER_USE_GUNICORN" ]+then+ python3 manage.py runserver 0.0.0.0:8000+else+ gunicorn wger.wsgi:application --reload --bind 0.0.0.0:8000+fi++diff --git a/extras/docker/development/settings.py b/extras/docker/development/settings.pyindex bea1370fd..bb6a5ee17 100644--- a/extras/docker/development/settings.py+++ b/extras/docker/development/settings.py@@ -6,8 +6,8 @@ from wger.settings_global import *# Use 'DEBUG = True' to get more details for server errors-DEBUG = True-TEMPLATES[0]['OPTIONS']['debug'] = True+DEBUG = os.environ.get("DJANGO_DEBUG", True)+TEMPLATES[0]['OPTIONS']['debug'] = DEBUGADMINS = (('Your name', '[email protected]'),@@ -51,9 +51,11 @@ SITE_URL = 'http://localhost:8000'# Path to uploaded files# Absolute filesystem path to the directory that will hold user-uploaded files.-MEDIA_ROOT = '/home/wger/media'+MEDIA_ROOT = os.environ.get("DJANGO_MEDIA_ROOT", '/home/wger/media')MEDIA_URL = '/media/'+STATIC_ROOT = os.environ.get("DJANGO_STATIC_ROOT", '/home/wger/static')+# Allow all hosts to access the application. Change if used in production.ALLOWED_HOSTS = '*'diff --git a/requirements.txt b/requirements.txtindex ed1038345..711f7c237 100644--- a/requirements.txt+++ b/requirements.txt@@ -1,10 +1,7 @@#-# Requirements for wger for production+# Common requirements for wger#-# Building/installing-wheel-# Applicationbleach~=3.1django-bootstrap-breadcrumbs~=0.9@@ -30,9 +27,6 @@ sphinx# AWS#boto3-# Production-#psycopg2-#python-memcached# REST APIdjango-cors-headers>=3.0diff --git a/requirements_devel.txt b/requirements_dev.txtsimilarity index 52%rename from requirements_devel.txtrename to requirements_dev.txtindex 02895e332..34d9e1ab7 100644--- a/requirements_devel.txt+++ b/requirements_dev.txt@@ -1,10 +1,13 @@#-# Requirements for wger during development+# Requirements for wger during development only#-# Production packages+# Regular packages-r requirements.txt+# Building/installing+wheel+# Development packagescoveragedjango-debug-toolbardiff --git a/requirements_prod.txt b/requirements_prod.txtnew file mode 100644index 000000000..2aeec311f--- /dev/null+++ b/requirements_prod.txt@@ -0,0 +1,11 @@+#+# Requirements for wger for production+#++# Regular packages+-r requirements.txt++gunicorn~=20.0+psycopg2-binary+django-redis+