Self hosted FLOSS fitness/workout, nutrition and weight tracker
Refactor docker build to not use git checkout
Scott Peshakaec06ea70b99
diff --git a/.dockerignore b/.dockerignorenew file mode 100644index 000000000..00b49fa92--- /dev/null+++ b/.dockerignore@@ -0,0 +1,4 @@+venv+node_modules+**/__pycache__+*.egg-infodiff --git a/.gitignore b/.gitignoreindex 080429a93..22760faf3 100644--- a/.gitignore+++ b/.gitignore@@ -59,6 +59,8 @@ target/# IDE.idea/-# External Libraries+# External Librarieswger/core/static/bower_componentsnode_modules++venvdiff --git a/extras/docker/apache/Dockerfile b/extras/docker/apache/Dockerfileindex 44b088c19..423ce954a 100644--- a/extras/docker/apache/Dockerfile+++ b/extras/docker/apache/Dockerfile@@ -19,6 +19,9 @@ ENV LANG en_US.UTF-8ENV LANGUAGE en_US:enENV LC_ALL en_US.UTF-8+# Path to where misc docker files live, relative to the project root+ARG DOCKER_DIR=./extras/docker/apache+# Install dependenciesRUN apt-get update \@@ -29,7 +32,7 @@ RUN apt-get update \&& rm -rf /var/lib/apt/lists/*# Configure apache-ADD wger.conf /etc/apache2/sites-available/+COPY ${DOCKER_DIR}/wger.conf /etc/apache2/sites-available/RUN a2dissite 000-default.conf \&& a2enmod headers \&& a2ensite wger \@@ -38,18 +41,18 @@ RUN a2dissite 000-default.conf \&& usermod -G wger www-data# Configure cron-ADD crontab /etc/cron.d/wger-ADD venvwrapper /home/wger/venvwrapper+COPY ${DOCKER_DIR}/crontab /etc/cron.d/wger+COPY ${DOCKER_DIR}/venvwrapper /home/wger/venvwrapperRUN chmod 0644 /etc/cron.d/wger \&& chmod +x /home/wger/venvwrapper \&& touch /var/log/cron.log+COPY --chown=wger:www-data . /home/wger/src+# Set up the applicationRUN ln -s /home/wger/static/CACHE /var/wwwUSER wger-RUN git clone -b ${SOURCE_BRANCH:-master} https://github.com/wger-project/wger.git /home/wger/src \- && git -C /home/wger/src rev-parse HEADWORKDIR /home/wger/srcRUN virtualenv --python python3 /home/wger/venv