diff --git a/docs/docker.rst b/docs/docker.rst index f52ab79be..717858c2c 100644 --- a/docs/docker.rst +++ b/docs/docker.rst @@ -18,9 +18,9 @@ First build the image:: Run a container and start the application:: - docker run -ti --name wger.test1 --publish 8000:8000 wger/devel - source ~/venv/bin/activate - python manage.py runserver 0.0.0.0:8000 + docker run -ti --name wger.devel --publish 8000:8000 wger/devel + (in docker) source ~/venv/bin/activate + (in docker) python manage.py runserver 0.0.0.0:8000 Now you can access the application on port 8000 of your host (probably just http://localhost:8000). diff --git a/extras/docker/apache/Dockerfile b/extras/docker/apache/Dockerfile index 9f4c99215..c231e294e 100644 --- a/extras/docker/apache/Dockerfile +++ b/extras/docker/apache/Dockerfile @@ -44,6 +44,7 @@ RUN npm install bower \ --database-path /home/wger/db/database.sqlite \ && invoke bootstrap_wger --settings-path /home/wger/src/settings.py --no-start-server + # Change permissions of some files and folders so the apache process # can access them. RUN chmod o+w -R ~/db/ \ diff --git a/extras/docker/development/Dockerfile b/extras/docker/development/Dockerfile index 404c69d6f..6667b50fd 100644 --- a/extras/docker/development/Dockerfile +++ b/extras/docker/development/Dockerfile @@ -2,6 +2,10 @@ # Dockerimage for wger development # # Please consult the documentation for usage +# docker build -t wger/devel . +# docker run -ti --name wger.devel --publish 8000:8000 wger/devel +# (in docker) source ~/venv/bin/activate +# (in docker) python manage.py runserver 0.0.0.0:8000 # # @@ -11,18 +15,21 @@ FROM ubuntu:15.04 MAINTAINER Roland Geider EXPOSE 8000 +# Install dependencies RUN apt-get update;\ apt-get install -y nodejs nodejs-legacy npm git \ python-virtualenv python3-dev \ libjpeg8-dev zlib1g-dev libwebp-dev \ vim +# Add wger user RUN adduser wger --disabled-password --gecos "" USER wger -RUN git clone https://github.com/rolandgeider/wger.git /home/wger/src -RUN virtualenv --python python3 /home/wger/venv +# Set up the application +RUN git clone https://github.com/rolandgeider/wger.git /home/wger/src WORKDIR /home/wger/src +RUN virtualenv --python python3 /home/wger/venv RUN npm install bower \ && . /home/wger/venv/bin/activate \ && pip install --upgrade pip \