A Dockerfile to generate an all-in-one pandrugs server
Clone or download

README.md

pandrugsdb-docker

Version: 2018.11.7

A Dockerfile to generate an all-in-one pandrugs server.

Versions of PanDrugs components included in this image

  • Front-end: 1.2.1
  • Back-end: 1.1.0
  • Perl variant analysis module: v19
  • Database: 20180328

Versions of databases used by PanDrugs and included this image

Building the image

Edit the context.xml file in order to configure the mail system (see SMTP Configuration Properties for configuration details).

<Resource name="mail/session"
        auth="Container"
        type="javax.mail.Session"
        mail.smtp.host="sing.ei.uvigo.es"
        mail.smtp.port="25"
        mail.smtp.auth="false"
/>

Inside the cloned repository:

docker build -t pandrugs .

This will take some time because the image will retrieve big files from internet (databases).

Starting the server

docker run -d -v [your_local_dir_for_data OR volume_name]:/pandrugs-backend_data -p 80:8080 pandrugs

This will make your server available via the port 80 at the container machine.

Accessing the server

The frontend will be serving at: http://yourhost

The backend will be serving at: http://yourhost/pandrugs-backend

Accessing the database

Take the running instance ID

docker ps
CONTAINER ID    IMAGE   COMMAND    CREATED      STATUS                          PORTS                   NAMES
da903ab4c25d    pandrugs:latest     "/run.sh"   31 minutes ago  Up 31 minutes   0.0.0.0:8080->8080/tcp  jovial_hawking

docker exec -it da903ab4c25d /usr/bin/mysql -uroot

Getting the pandrugs tomcat log

Take the running instance ID

docker ps
CONTAINER ID    IMAGE   COMMAND    CREATED      STATUS                          PORTS                   NAMES
da903ab4c25d    pandrugs:latest     "/run.sh"   31 minutes ago  Up 31 minutes   0.0.0.0:8080->8080/tcp  jovial_hawking

docker exec -it da903ab4c25d tail -f /pandrugsdb.log

Stopping the server

Take the running instance ID

docker ps
CONTAINER ID    IMAGE   COMMAND    CREATED      STATUS                          PORTS                   NAMES
da903ab4c25d    pandrugs:latest     "/run.sh"   31 minutes ago  Up 31 minutes   0.0.0.0:8080->8080/tcp  jovial_hawking

docker stop da903ab4c25d