Skip to content

How to develop using a container

Renato Simões edited this page Sep 11, 2024 · 6 revisions

For web development, it is ideal for the project to be running inside the container to execute system calls and the FastProtein.jar installed in the container.

To achieve this, you can do the following:

Clone the Project

git clone https://github.com/bioinformatics-ufsc/FastProtein.git

For Use WITH InterProScan Version (20GB compressed)

docker pull bioinfoufsc/fastprotein:latest

For Use WITHOUT InterProScan (1.6GB compressed)

docker pull bioinfoufsc/fastprotein:clean-latest

For web module

If you want to modify only the web module:

docker run -d -it --name FastProtein -p 5000:5000 -v <path_of_FastProtein_git>/web:/FastProtein/web bioinfoufsc/fastprotein:latest

Access the Docker Container

docker exec -it FastProtein /bin/bash

Once Inside the Docker Container, execute, the debug mode wills stop the current flask execution and start debug mode:

root@<containerid>:/FastProtein# ./web/debug.sh

For both java and web modules

Note you don´t mount volume in /FastProtein/web

docker run -d -it --name FastProtein -p 5000:5000 -v <path_of_FastProtein_git>:/FastProtein bioinfoufsc/fastprotein:latest

Access the Docker Container

docker exec -it FastProtein /bin/bash

Once Inside the Docker Container, give execution permissions:

root@<containerid>:/FastProtein# mvn clean install

Note, there is a build rotine in pom.xml that copies the FastProtein.jar into directory ./bin/FastProtein.jar, this file is not versioned, so don´t forget to call: mvn clean install

Web and Java module are independent, so you don`t need to restart Web module after updating Java Module

Open link http://127.0.0.1:5000

This command will stop the execution and start debug mode (which will restart sessions and update the sources).

Clone this wiki locally