Self hosted FLOSS fitness/workout, nutrition and weight tracker
Fix problem with apache image
Roland Geider7bca36048e55
diff --git a/docs/docker.rst b/docs/docker.rstindex bb2497323..f52ab79be 100644--- a/docs/docker.rst+++ b/docs/docker.rst@@ -48,11 +48,11 @@ This image runs the application using WSGI and apache.First build the image::- docker build -t wger/apache .+ docker build --tag wger/apache .Run a container and start the application::- docker run -ti --name wger.apache --publish 80:8000 wger/apache+ docker run -ti --name wger.apache --publish 8000:80 wger/apacheNow you can access the application on port 8000 of your host (probably justhttp://localhost:8000).\ No newline at end of filediff --git a/extras/docker/apache/Dockerfile b/extras/docker/apache/Dockerfileindex 232ab7bea..9f4c99215 100644--- a/extras/docker/apache/Dockerfile+++ b/extras/docker/apache/Dockerfile@@ -2,6 +2,8 @@# Dockerimage for wger development## Please consult the documentation for usage+# docker build --tag wger/apache .+# docker run -ti --name wger.apache --publish 8000:80 wger/apache##@@ -12,7 +14,7 @@ EXPOSE 80# Install dependenciesRUN apt-get update;\- apt-get install -y apache2 libapache2-mod-wsgi \+ apt-get install -y apache2 libapache2-mod-wsgi-py3 \nodejs nodejs-legacy npm git \python-virtualenv python3-dev \libjpeg8-dev zlib1g-dev libwebp-dev \@@ -44,21 +46,18 @@ RUN npm install bower \# Change permissions of some files and folders so the apache process# can access them.-WORKDIR /home/wger-RUN chmod o+w ~/db/database.sqlite \- && mkdir static \- && mkdir media \- && chmod o+w media \- && sed -i "/^MEDIA_ROOT/c\MEDIA_ROOT='\/home\/wger\/media'" src/settings.py \- && echo STATIC_ROOT=\'/home/wger/static\' >> src/settings.py \- && mkdir /home/wger/src/components #WTF? \- && python manage.py collectstatic+RUN chmod o+w -R ~/db/ \+ && . /home/wger/venv/bin/activate \+ && mkdir ~/static \+ && mkdir ~/media \+ && chmod o+w ~/media \+ && sed -i "/^MEDIA_ROOT/c\MEDIA_ROOT='\/home\/wger\/media'" settings.py \+ && echo STATIC_ROOT=\'/home/wger/static\' >> settings.py \+ && mkdir /home/wger/src/components \+ && python manage.py collectstatic --noinputUSER rootRUN chmod 755 /usr/sbin/apache2ctlENTRYPOINT ["/usr/sbin/apache2ctl"]-CMD ["-D", "FOREGROUND"]--#CMD ["/usr/sbin/apache2ctl -D FOREGROUND"]-# CMD ["/bin/bash"]+CMD ["-D", "FOREGROUND"]\ No newline at end of filediff --git a/extras/docker/development/Dockerfile b/extras/docker/development/Dockerfileindex 826091951..404c69d6f 100644--- a/extras/docker/development/Dockerfile+++ b/extras/docker/development/Dockerfile@@ -28,8 +28,8 @@ RUN npm install bower \&& pip install --upgrade pip \&& pip install -r requirements_devel.txt \&& invoke create_settings \- --settings-path /home/wger/src/settings.py \- --database-path /home/wger/db/database.sqlite \+ --settings-path /home/wger/src/settings.py \+ --database-path /home/wger/db/database.sqlite \&& invoke bootstrap_wger --settings-path /home/wger/src/settings.py --no-start-server