Self hosted FLOSS fitness/workout, nutrition and weight tracker
Fix issue with development mode
Roland Geiderd40821cdeb6a
diff --git a/docs/changelog.rst b/docs/changelog.rstindex db08be608..73337ccd0 100644--- a/docs/changelog.rst+++ b/docs/changelog.rst@@ -24,7 +24,7 @@ Upgrade steps from 1.9:🐛 Bug Fixes:-* `#499`_, `#505`_, `#504`_, `#511`_, `#522`_+* `#499`_, `#505`_, `#504`_, `#511`_, `#516`_, `#522`_🧰 Maintenance:@@ -50,6 +50,7 @@ Upgrade steps from 1.9:.. _#504: https://github.com/wger-project/wger/issues/504.. _#505: https://github.com/wger-project/wger/issues/505.. _#511: https://github.com/wger-project/wger/issues/511+.. _#516: https://github.com/wger-project/wger/issues/516.. _#522: https://github.com/wger-project/wger/issues/522diff --git a/extras/docker/development/Dockerfile b/extras/docker/development/Dockerfileindex 705dd2f9e..09234fe44 100644--- a/extras/docker/development/Dockerfile+++ b/extras/docker/development/Dockerfile@@ -46,14 +46,14 @@ COPY ${DOCKER_DIR}/settings.py /home/wger/srcCOPY ${DOCKER_DIR}/settings.py /tmp/COPY ${DOCKER_DIR}/entrypoint.sh /home/wger/entrypoint.shRUN chmod +x /home/wger/entrypoint.sh-RUN pip3 install --no-cache /wheels/* \- && python3 setup.py develop+RUN pip3 install --no-cache /wheels/*RUN chown -R wger:wger .USER wgerRUN mkdir ~/media \&& mkdir ~/static \- && mkdir ~/db/+ && mkdir ~/db/ \+ && python3 setup.py developCMD ["/home/wger/entrypoint.sh"]diff --git a/extras/docker/development/entrypoint.sh b/extras/docker/development/entrypoint.shindex 0f7890f25..5cfd3942a 100644--- a/extras/docker/development/entrypoint.sh+++ b/extras/docker/development/entrypoint.sh@@ -16,15 +16,21 @@ if [[ "$DJANGO_DB_PORT" == "5432" ]]; thenecho "PostgreSQL started :)"fi-# Bootstrap the application-wger bootstrap--if [[ "$WGER_DOWNLOAD_IMGS" == "TRUE" ]];+# The python wger package needs to be installed in development mode.+# If the created folder does not exist (e.g. because this image was mounted+# after a first checkout), repeat the process.+if [ ! -d "/home/wger/src/wger.egg-info" ];then- wger download-exercise-images- chmod -R g+w ~wger/media+ python3 setup.py develop --userfi+# Bootstrap the application+# * Load the fixtures with exercises, ingredients, etc+# * Create an admin user+# * Download JS and CSS files+# * Compile custom bootstrap theme+wger bootstrap+# Collect static filesif [[ "$DJANGO_DEBUG" == "False" ]];then@@ -38,5 +44,3 @@ thenelsepython3 manage.py runserver 0.0.0.0:8000fi--