Self hosted FLOSS fitness/workout, nutrition and weight tracker
Set PYTHONPATH
Roland Geider1c276ed3d7e3
diff --git a/extras/docker/demo/Dockerfile b/extras/docker/demo/Dockerfileindex 7859f744a..5318cd224 100644--- a/extras/docker/demo/Dockerfile+++ b/extras/docker/demo/Dockerfile@@ -104,18 +104,24 @@ USER wgerWORKDIR /home/wger/srcRUN python3 -m venv /home/wger/venv-# Change permissions of some files and folders so the apache process-# can access them.+# Configure the application+ENV PYTHONPATH=/home/wger/src+ENV DJANGO_SETTINGS_MODULE=settings.main+ENV MEDIA_ROOT=/home/wger/media+ENV STATIC_ROOT=/home/wger/static+ENV DJANGO_DB_DATABASE=/home/wger/db/database.sqlite+ENV COMPRESS_OFFLINE=True++# Change permissions of some files and folders so the apache process can access them.RUN mkdir -p ~/static/CACHE ~/media \&& ln -s /home/wger/static/CACHE /home/wger/src/CACHE \&& chmod g+w /home/wger/static/CACHERUN --mount=type=bind,from=builder,source=/wheels,target=/wheels . /home/wger/venv/bin/activate \- && pip install --upgrade pip \&& pip install --no-cache /wheels/* \&& pip install -e . \- && sed -i "/^MEDIA_ROOT/c\MEDIA_ROOT='\/home\/wger\/media'" settings/production.py \- && echo STATIC_ROOT=\'/home/wger/static\' >> settings/production.py \+ && mkdir -p /home/wger/db \+ && . /home/wger/venv/bin/activate \&& wger bootstrap --no-process-static \&& python3 manage.py sync-exercises \&& wger load-online-fixtures \diff --git a/extras/docker/production/Dockerfile b/extras/docker/production/Dockerfileindex 4c056d45e..52a2b76b3 100644--- a/extras/docker/production/Dockerfile+++ b/extras/docker/production/Dockerfile@@ -79,7 +79,8 @@ ARG BUILD_DATEENV PATH="/home/wger/.local/bin:$PATH"ENV APP_BUILD_COMMIT=$BUILD_COMMITENV APP_BUILD_DATE=$BUILD_DATE-ENV DJANGO_SETTINGS_MODULE='settings.main'+ENV PYTHONPATH=/home/wger/src+ENV DJANGO_SETTINGS_MODULE=settings.mainWORKDIR /home/wger/srcEXPOSE 8000