Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Dec 7, 2017
2 parents c20a9b8 + 2744cd7 commit 33257f2
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM python:3-onbuild

WORKDIR .
COPY setup.py .
RUN apt-get update && apt-get install -y \
openssl \
sqlite3 \
libsqlite3-dev \
libssl-dev \
gdal-bin \
libproj-dev \
libgeos-dev \
libspatialite-dev
RUN pip3 install -U pip setuptools wheel
RUN pip3 install -U .

WORKDIR tests/
CMD ["./docker-entrypoint.sh"]
EXPOSE 8000
15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,21 @@ Run tests with:
./runtests.py
Install and run on docker
--------------------------

Build from the Dockerfile:

.. code-block:: shell
  sudo docker build -t openwisp/controller .
Run the docker container:

.. code-block:: shell
  sudo docker run -it -p 8000:8000 openwisp/controller
Talks
-----

Expand Down
6 changes: 6 additions & 0 deletions tests/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

python3 manage.py migrate
python3 manage.py createsuperuser
python3 manage.py runserver 0.0.0.0:8000
echo "EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'" > local_settings.py

0 comments on commit 33257f2

Please sign in to comment.