nthomasCUBE / RNASeqExpressionBrowser

1 stars 0 forks source link

RNASeqExpressionBrowser does not start inside docker #1

Open mictadlo opened 6 years ago

mictadlo commented 6 years ago

Hi, Unfortunately, I was not able to get RNASeqExpressionBrowser running inside a docker container. By any chance do you know where did I do anything wrong? To start the below container you would need to execute docker-compose up. Please find below all the files:

docker-compose.yml:

version: '3'
services:
  expressionbrowser:
      build: .
      restart: always
      ports:
          - "80:80"
      depends_on:
          - expressionbrowserdb
      volumes:
          - ./data/:/db

  expressionbrowserdb:
    image: mariadb
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=admin
      - MYSQL_DATABASE=expressionbrowser
      - MYSQL_USER=browseradmin
      - MYSQL_PASSWORD=password
    ports:
      - "3306:3306"
    volumes:
      - ./mysql/:/docker-entrypoint-initdb.d

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    restart: always
    depends_on:
      - expressionbrowserdb
    ports:
      - 8183:80
    environment:
      PMA_USER: root
      PMA_PASSWORD: admin
      PMA_ARBITRARY: 1

mysql/rna.sql

CREATE DATABASE IF NOT EXISTS expressionbrowser;
CREATE USER 'browseradmin'@'localhost';
SET PASSWORD FOR 'browseradmin'@'localhost' = PASSWORD('password');
CREATE SCHEMA expressionbrowser;
GRANT ALL PRIVILEGES on expressionbrowser.* TO 'browseradmin'@'localhost';

Dockerfile:

FROM debian:stretch-backports
RUN apt-get update  && apt-get install -y --no-install-recommends \
    build-essential \
    apache2 \
    python-dev \
    python-setuptools \
    python-numpy \
    python-mysqldb \
    python-pip \
    python-wheel \
    git wget \
    ncbi-blast+ && \
    apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

#Based on: https://github.com/eriston/Apache-with-python-cgi-Docker
#load apache cgi module
RUN a2enmod cgi
RUN service apache2 restart

#enable cgi in the website root
#second block to allow .htaccess
RUN echo "                       \n \
<Directory /var/www/html>        \n \
   Options +ExecCGI              \n \
   AddHandler cgi-script .py     \n \
   DirectoryIndex index.py       \n \
</Directory>                     \n \
" >> /etc/apache2/apache2.conf

RUN chmod -R u+rwx,g+x,o+x /var/www/html

RUN pip install fisher goatools

RUN git clone https://github.com/nthomasCUBE/RNASeqExpressionBrowser.git
COPY ./example RNASeqExpressionBrowser/example

RUN cd RNASeqExpressionBrowser && \
    sed -i.bak "s|mysql_host::server|mysql_host::expressionbrowserdb|" installation_example.conf && \
    sed -i.bak "s|mysql_db::db|mysql_db::expressionbrowser|" installation_example.conf && \
    sed -i.bak "s|mysql_user::user|mysql_user::browseradmin|" installation_example.conf && \
    sed -i.bak 's|raw_input(">Please specify the absolute path to the directory where CSS file should be stored (within the /var/www/html directory, directory must exist) e.g. \[/var/www/html\]\\n") or my_input;|"/usr/lib/cgi-bin"|' installation.py && \
    sed -i.bak 's|raw_input(">Please specify the absolute path to the directory of the web server location, somewhere under e.g. \[/var/www/cgi-bin OR /usr/lib/cgi-bin\]\\n")|"/var/www/html"|' installation.py && \
    sed -i.bak 's|raw_input(">Please provide the path to the directory where R-output can be stored and accessed by apache-user e.g. \[/nfs/plantsp/webblast/data/\]\n")|"/data/webblast"|' installation.py #&& \
    #python installation.py installation_example.conf

EXPOSE 80
CMD /usr/sbin/apache2ctl -D FOREGROUND

What did I miss?

Thank you in advance.

Michal

nthomasCUBE commented 6 years ago

Hi Michal,

sorry to hear,never used docker so far, will try to check later today or tomorrow latest

br thomas

mictadlo commented 6 years ago

Thank you. The example folder I downloaded from your website and added it to the same folder where the Dockerfile is. Maybe you could undo the https://github.com/nthomasCUBE/RNASeqExpressionBrowser/commit/ea0fbc94f59e0f4cfaa741c0392a1936d240078f .?

nthomasCUBE commented 6 years ago

Hi Michal,

quite busy these days but will try to find some time today or this week, will try to undo the example folder, quess was in total a bit difficult to install and configure everything, have once uploaded the tool after I tried to install it with a colleague back then

probably would also have to set up a VM myself to check again

br+thanks thomas

Am Mi., 1. Aug. 2018 um 14:54 Uhr schrieb Michał T. Lorenc < notifications@github.com>:

Thank you. The example folder I downloaded from your website and added it to the same folder where the Dockerfile is. Maybe you could undo the ea0fbc9 https://github.com/nthomasCUBE/RNASeqExpressionBrowser/commit/ea0fbc94f59e0f4cfaa741c0392a1936d240078f .?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nthomasCUBE/RNASeqExpressionBrowser/issues/1#issuecomment-409564436, or mute the thread https://github.com/notifications/unsubscribe-auth/AP5bHRQWTIsLG7hlywBYa3W2xI48A2n6ks5uMaT3gaJpZM4VqPbi .

-- Dr. Thomas Nussbaumer Telefon: +49(0) 821-598 6413 Raum: 035

Institut für Umweltmedizin (IEM) & UNIKA-T Neusässer Straße 47 86156 Augsburg Deutschland http://www.unika-t.de/lehrstuehle-und-institute/umweltmedizin/willkommen/

Institut für Netzwerkbiologie Gebäude 25 Ingolstädter Landstraße 1 85764 Neuherberg Deutschland https://www.helmholtz-muenchen.de/inet/index.html

nthomasCUBE commented 6 years ago

have uploaded the example files here: https://github.com/nthomasCUBE/RNASeqExpressionBrowser/blob/master/example/example.zip

mictadlo commented 6 years ago

Could you please extract the file ?

nthomasCUBE commented 6 years ago

done, except transcripts_NT i had to zip due to size constraints

mictadlo commented 6 years ago

Thank you, Did you have any luck to get Docker running?

nthomasCUBE commented 6 years ago

Hi, fear need to create new VM and set up everything etc. hope to make some progress this week

thanks

mictadlo commented 6 years ago

Hi, any updates?

nthomasCUBE commented 6 years ago

Hi Michal,

sorry, bit busy these weeks..but will try now... now sure whether i will be able to but will try

br thomas

Am Mi., 22. Aug. 2018 um 15:16 Uhr schrieb Michał T. Lorenc < notifications@github.com>:

Hi, any updates?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nthomasCUBE/RNASeqExpressionBrowser/issues/1#issuecomment-415027746, or mute the thread https://github.com/notifications/unsubscribe-auth/AP5bHacEbmX1keiXuQaY2dHsvTSjLNZ8ks5uTVmagaJpZM4VqPbi .

-- Dr. Thomas Nussbaumer Telefon: +49(0) 821-598 6413 Raum: 035

Institut für Umweltmedizin (IEM) & UNIKA-T Neusässer Straße 47 86156 Augsburg Deutschland http://www.unika-t.de/lehrstuehle-und-institute/umweltmedizin/willkommen/

Institut für Netzwerkbiologie Gebäude 25 Ingolstädter Landstraße 1 85764 Neuherberg Deutschland https://www.helmholtz-muenchen.de/inet/index.html

nthomasCUBE commented 6 years ago

so, version attached should be installable now will check how to change it to be able to run in docker next days hopefully br

mictadlo commented 6 years ago

Thank you very much for doing it.

nthomasCUBE commented 6 years ago

following should work, will update Code next week then

i will store the files in the directcory /docker on github https://github.com/nthomasCUBE/RNASeqExpressionBrowser/tree/master/dockerfiles the important Thing is that in the MySQLdb Connection object, the host Name is defined then by the Name of the mysql database in "docker-compose.yml" which is here "expressionbrowerdb" which needss to adjusted in each script with the database connector

mictadlo commented 6 years ago

Hi, Or maybe you could move the Dockerfile and docker-compose.yml one level up so that COPY command will work? Furthermore, why you don't copy *.py files?

Additionally, D is missing in FOREGROUN here https://github.com/nthomasCUBE/RNASeqExpressionBrowser/blob/master/dockerfiles/Dockerfile#L28

Thank you in advance.

Michal

nthomasCUBE commented 6 years ago

super thanks! I fixed the "D" issue and will try to generate a new version specific for docker in the next days hopefully

mictadlo commented 5 years ago

Hi Thomas, By any chance, have you had time to finish it?

Thank you in advance,

Michal