Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
First stab at Docker. See #94.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelloPerathoner committed Sep 13, 2019
1 parent 8de9296 commit 7ccb0b2
Show file tree
Hide file tree
Showing 64 changed files with 2,697 additions and 1,152 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,10 @@ target/

#Ipython Notebook
.ipynb_checkpoints

#docker
docker/server
docker/ntg_common
docker/client
docker/scripts
docker/backup
21 changes: 16 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,19 @@ dev-server-production:

server:
export PYTHONPATH=$(ROOT)/server:$(ROOT); \
python3 -m server.server -vvv
python3 -m server -vvv

common-clean:
cd ntg_common ; make clean; cd ..

server-clean:
cd server ; make clean; cd ..

docker-build: server-clean common-clean
cd docker; make build; cd ..

docker-run:
cd docker; make run; cd ..

users:
scripts/cceh/mk_users.py -vvv instance/_global.conf
Expand Down Expand Up @@ -245,11 +257,10 @@ install-prerequisites:
python3 python3-pip \
git make npm graphviz plantuml
sudo pip3 install --upgrade pip
sudo pip3 install --upgrade -r server/requirements.txt
sudo pip3 install --upgrade -r scripts/cceh/requirements.txt
sudo pip3 install --upgrade \
numpy networkx matplotlib pillow \
psycopg2 mysqlclient sqlalchemy sqlalchemy-utils intervals \
flask babel flask-babel flask-sqlalchemy jinja2 flask-user \
sphinx sphinx_rtd_theme sphinx_js sphinxcontrib-plantuml \
sphinx sphinx_rtd_theme sphinx_js sphinxcontrib-plantuml

# yum install python34-pip python34-pylint mysql-devel python34-devel node mysql_fdw_10 postgresql10-server
# pip3 install -U setuptools
71 changes: 71 additions & 0 deletions doc_src/install-docker.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
==========================
Installation with Docker
==========================

This chapter describes how to install the software on a Desktop computer with
Docker.

.. note::

These instructions are tested only on Linux. Feedback for Windows and Mac is welcome.

1. Install Docker.

- For Windows see: https://docs.docker.com/docker-for-windows/install/

- For Mac see: https://docs.docker.com/docker-for-mac/install/

- For Debian Linux see: https://docs.docker.com/compose/install/

2. Create a new directory and change into it.

3. Download https://raw.githubusercontent.com/cceh/ntg/master/docker/docker-compose.yml

4. Run:

.. code-block:: shell
$ docker-compose up
This will download the docker containers and initialize the database. This
make take some time depending on your internet connection speed and your PC.

5. Test the installation.
Point your browser to the url: http://localhost:5000/acts/ph4/

Use the application.

6. When satisfied, hit :kbd:`Ctrl+C` to stop the docker service.

The Docker service is now installed.


============================
Running the Docker service
============================

Any time you want to run the docker service say:

.. code-block:: shell
$ docker-compose start
and to stop it say:

.. code-block:: shell
$ docker-compose stop
To use the application point your browser to http://localhost:5000/acts/ph4/
while the service is running.


======
CBGM
======

To run the CBGM:

.. code-block:: shell
$ docker-compose run ntg-app-server cbgm
Loading

0 comments on commit 7ccb0b2

Please sign in to comment.