diff --git a/.gitmodules b/.gitmodules index 257619f..53ffdc9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -99,13 +99,10 @@ url = https://github.com/GMOD/chado_tools [submodule "cxgn/cxgn/Bio-Chado-Schema"] path = cxgn/Bio-Chado-Schema - url = https://github.com/GMOD/Bio-Chado-Schema + url = https://github.com/solgenomics/bio-chado-schema [submodule "cxgn/chado_tools"] path = cxgn/chado_tools url = https://github.com/GMOD/chado_tools -[submodule "cxgn/Bio-Chado-Schema"] - path = cxgn/Bio-Chado-Schema - url = https://github.com/GMOD/Bio-Chado-Schema [submodule "cxgn/QuantGenResources"] path = cxgn/QuantGenResources url = https://github.com/solgenomics/QuantGenResources.git @@ -117,3 +114,6 @@ url = https://github.com/solgenomics/sgn-biotools.git +[submodule "cxgn/Bio-Chado-Schema"] + path = cxgn/bio-chado-schema + url = git@github.com:solgenomics/bio-chado-schema diff --git a/Dockerfile b/Dockerfile index e7f7111..f715acf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,7 @@ RUN bash -c "apt-key adv --keyserver keyserver.ubuntu.com --recv-key '95C0FAF38D # add cran backports repo and required deps # -RUN echo "deb http://lib.stat.cmu.edu/R/CRAN/bin/linux/debian bullseye-cran40/" >> /etc/apt/sources.list +RUN echo "deb https://cloud.r-project.org/bin/linux/debian/ bullseye-cran40/" >> /etc/apt/sources.list RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list @@ -42,7 +42,7 @@ RUN apt-get update --fix-missing -y RUN apt-get install -y aptitude -RUN aptitude install -y npm libterm-readline-zoid-perl nginx starman emacs gedit vim less sudo htop git dkms linux-headers-generic perl-doc ack make xutils-dev nfs-common lynx xvfb ncbi-blast+ primer3 libmunge-dev libmunge2 munge slurm-wlm slurmctld slurmd libslurm-perl libssl-dev graphviz lsof imagemagick mrbayes muscle bowtie bowtie2 postfix mailutils libcupsimage2 postgresql-client-12 libglib2.0-dev libglib2.0-bin screen apt-transport-https libgdal-dev libproj-dev libudunits2-dev locales locales-all rsyslog cron libnlopt0 plink +RUN aptitude install -y npm libimage-magick-perl libimage-exiftool-perl libterm-readline-zoid-perl nginx starman emacs gedit vim less sudo htop git dkms linux-headers-generic perl-doc ack make xutils-dev nfs-common lynx xvfb ncbi-blast+ primer3 libmunge-dev libmunge2 munge slurm-wlm slurmctld slurmd libslurm-perl libssl-dev graphviz lsof imagemagick mrbayes muscle clustalw bowtie bowtie2 postfix mailutils libcupsimage2 postgresql-client-12 libglib2.0-dev libglib2.0-bin screen apt-transport-https libgdal-dev libproj-dev libudunits2-dev locales locales-all rsyslog cron libnlopt0 plink # Set the locale correclty to UTF-8 RUN locale-gen en_US.UTF-8 @@ -92,11 +92,11 @@ RUN apt-get install libmoosex-runnable-perl -y RUN apt-get install libgdbm6 libgdm-dev -y RUN apt-get install nodejs -y -RUN cpanm Selenium::Remote::Driver@1.44 +RUN cpanm Selenium::Remote::Driver@1.49 #INSTALL OPENCV IMAGING LIBRARY -RUN apt-get install -y python3-dev python3-pip python3-numpy libgtk2.0-dev libgtk-3-0 libgtk-3-dev libavcodec-dev libavformat-dev libswscale-dev libhdf5-serial-dev libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libxvidcore-dev libatlas-base-dev gfortran libgdal-dev exiftool libzbar-dev cmake +RUN apt-get install -y python3-dev python3-pip python3-numpy libgtk2.0-dev libgtk-3-0 libgtk-3-dev libavcodec-dev libavformat-dev libswscale-dev libhdf5-serial-dev libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libxvidcore-dev libatlas-base-dev gfortran libgdal-dev exiftool libzbar-dev zbar-tools cmake RUN pip3 install --upgrade pip RUN pip3 install grpcio==1.40.0 imutils numpy matplotlib pillow statistics PyExifTool pytz pysolar scikit-image packaging pyzbar pandas opencv-python \ @@ -134,7 +134,7 @@ RUN adduser --disabled-password --gecos "" -u 1250 production && chown -R produc WORKDIR /home/production/cxgn/sgn -ENV PERL5LIB=/home/production/cxgn/Bio-Chado-Schema/lib:/home/production/cxgn/local-lib/:/home/production/cxgn/local-lib/lib/perl5:/home/production/cxgn/sgn/lib:/home/production/cxgn/cxgn-corelibs/lib:/home/production/cxgn/Phenome/lib:/home/production/cxgn/Cview/lib:/home/production/cxgn/ITAG/lib:/home/production/cxgn/biosource/lib:/home/production/cxgn/tomato_genome/lib:/home/production/cxgn/chado_tools/chado/lib:. +ENV PERL5LIB=/home/production/cxgn/bio-chado-schema/lib:/home/production/cxgn/local-lib/:/home/production/cxgn/local-lib/lib/perl5:/home/production/cxgn/sgn/lib:/home/production/cxgn/cxgn-corelibs/lib:/home/production/cxgn/Phenome/lib:/home/production/cxgn/Cview/lib:/home/production/cxgn/ITAG/lib:/home/production/cxgn/biosource/lib:/home/production/cxgn/tomato_genome/lib:/home/production/cxgn/chado_tools/chado/lib:. ENV HOME=/home/production ENV PGPASSFILE=/home/production/.pgpass @@ -147,6 +147,9 @@ ARG CREATED ARG REVISION ARG BUILD_VERSION +ENV VERSION=${BUILD_VERSION} +ENV BUILD_DATE=${CREATED} + LABEL maintainer="lam87@cornell.edu" LABEL org.opencontainers.image.created=$CREATED LABEL org.opencontainers.image.url="https://breedbase.org/" @@ -158,6 +161,8 @@ LABEL org.opencontainers.image.title="breedbase/breedbase" LABEL org.opencontainers.image.description="Breedbase web server" LABEL org.opencontainers.image.documentation="https://solgenomics.github.io/sgn/" + + # start services when running container... # ENTRYPOINT ["/entrypoint.sh"] diff --git a/cxgn/Bio-Chado-Schema b/cxgn/Bio-Chado-Schema deleted file mode 160000 index c86838f..0000000 --- a/cxgn/Bio-Chado-Schema +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c86838f9fdcf74c932bd6d3ac57b6fc5ce086d47 diff --git a/cxgn/Cview b/cxgn/Cview index d1ade92..478fd8e 160000 --- a/cxgn/Cview +++ b/cxgn/Cview @@ -1 +1 @@ -Subproject commit d1ade9233cc390c5f22957a9f2e0378c3767201a +Subproject commit 478fd8e003d68ca8ef3b447543f45ec11727984e diff --git a/cxgn/R_libs b/cxgn/R_libs index 1df4101..68bba4f 160000 --- a/cxgn/R_libs +++ b/cxgn/R_libs @@ -1 +1 @@ -Subproject commit 1df41016dbaa8d9fac5e22c84a8e40e227b007a4 +Subproject commit 68bba4f303a16951092bc1c1d700d607082405b6 diff --git a/cxgn/bio-chado-schema b/cxgn/bio-chado-schema new file mode 160000 index 0000000..c9e3e99 --- /dev/null +++ b/cxgn/bio-chado-schema @@ -0,0 +1 @@ +Subproject commit c9e3e9959ab0a554a54edcc644fc8fa076b89a1b diff --git a/cxgn/cassava b/cxgn/cassava index 1d9687d..55d31ab 160000 --- a/cxgn/cassava +++ b/cxgn/cassava @@ -1 +1 @@ -Subproject commit 1d9687d3f69c84288449743dcf6b9cb7269e9a9a +Subproject commit 55d31ab04d0b783c602e95090e892d135fe358cf diff --git a/cxgn/cassbase b/cxgn/cassbase index 3583ef1..dba76f1 160000 --- a/cxgn/cassbase +++ b/cxgn/cassbase @@ -1 +1 @@ -Subproject commit 3583ef12be9eaefe55ae0f470578b41b750f8b48 +Subproject commit dba76f1924990c22ea2512572dfd5c0e8bf3c0b6 diff --git a/cxgn/citrusgreening b/cxgn/citrusgreening index 74d2b5c..5ea452b 160000 --- a/cxgn/citrusgreening +++ b/cxgn/citrusgreening @@ -1 +1 @@ -Subproject commit 74d2b5c5b08a81dd2b94ea53c1a5dd4c958beafb +Subproject commit 5ea452b4d1a4e7b7c7cc8b245258751932af9d2f diff --git a/cxgn/cxgn-corelibs b/cxgn/cxgn-corelibs index ab18307..db6292e 160000 --- a/cxgn/cxgn-corelibs +++ b/cxgn/cxgn-corelibs @@ -1 +1 @@ -Subproject commit ab1830753dfb1f577028b2103c7e432d385112b1 +Subproject commit db6292e3219d514beddf50c3a39926041badf10a diff --git a/cxgn/erysimum b/cxgn/erysimum index 41c2fc0..994e536 160000 --- a/cxgn/erysimum +++ b/cxgn/erysimum @@ -1 +1 @@ -Subproject commit 41c2fc0ab31741b1a167cac77874e11a54457aba +Subproject commit 994e53609c7c60a4127b961643ca9cc287e7ba70 diff --git a/cxgn/fernbase b/cxgn/fernbase index 6b9a93c..a9642b8 160000 --- a/cxgn/fernbase +++ b/cxgn/fernbase @@ -1 +1 @@ -Subproject commit 6b9a93c1dd6a545cf0a02a86945a5b15426b284d +Subproject commit a9642b885f8d8defd45b064e050da96a1b4e8a08 diff --git a/cxgn/gtsimsrch b/cxgn/gtsimsrch index c1379f7..de5469e 160000 --- a/cxgn/gtsimsrch +++ b/cxgn/gtsimsrch @@ -1 +1 @@ -Subproject commit c1379f79e65b0ad070fba7496ff209255db8f0aa +Subproject commit de5469e70d53621dbe7028bd9ddd020ba62aefea diff --git a/cxgn/local-lib b/cxgn/local-lib index 540344a..bff49e3 160000 --- a/cxgn/local-lib +++ b/cxgn/local-lib @@ -1 +1 @@ -Subproject commit 540344aa887d1048d497f9aa6c966916a9ffe3ad +Subproject commit bff49e39724aaf508385c186eb2e9cd22640247a diff --git a/cxgn/musabase b/cxgn/musabase index 6a91a48..e9e9941 160000 --- a/cxgn/musabase +++ b/cxgn/musabase @@ -1 +1 @@ -Subproject commit 6a91a485ed3b6ba8733ad36ba2096fd8935592fe +Subproject commit e9e9941c634d290c11b6695890f1c01aa5591722 diff --git a/cxgn/sgn b/cxgn/sgn index d94ab31..c5ddc4a 160000 --- a/cxgn/sgn +++ b/cxgn/sgn @@ -1 +1 @@ -Subproject commit d94ab31bad8b7cd63ccf6e98aedeec31e609b9d6 +Subproject commit c5ddc4ac1cbcde8d8dfcf3cf22a768c3f95b6f2c diff --git a/cxgn/solgenomics b/cxgn/solgenomics index 30e674e..418f9eb 160000 --- a/cxgn/solgenomics +++ b/cxgn/solgenomics @@ -1 +1 @@ -Subproject commit 30e674e052a5c61bce16fb83517c2904a96c5be6 +Subproject commit 418f9eb0f221c354ff1ac7fcc912ca12deb3df85 diff --git a/cxgn/sweetpotatobase b/cxgn/sweetpotatobase index f5e5e24..00ec650 160000 --- a/cxgn/sweetpotatobase +++ b/cxgn/sweetpotatobase @@ -1 +1 @@ -Subproject commit f5e5e24e3741f8b291fbefc82aa46fce82eb992e +Subproject commit 00ec650f8736c436550f24fe113e9e3f3f067b9d diff --git a/cxgn/yambase b/cxgn/yambase index 5e6376d..097acdf 160000 --- a/cxgn/yambase +++ b/cxgn/yambase @@ -1 +1 @@ -Subproject commit 5e6376d429bad2741e359940365ddb1b169588ec +Subproject commit 097acdfe337d256e180de87a6d77f9235f9c8c05 diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 6a74f6d..80264b7 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -11,6 +11,7 @@ services: - type: bind source: .git target: /home/production/.git + - shared_data:/downloads environment: MODE: 'DEVELOPMENT' PGDATABASE: breedbase @@ -19,7 +20,7 @@ services: PGUSER: postgres SGN_TEST_SERVER: http://breedbase:3010 SGN_REMOTE_SERVER_ADDR: selenium - + DBIC_TRACE: 0 selenium: container_name: selenium image: selenium/standalone-firefox-debug @@ -27,6 +28,7 @@ services: - type: bind source: ./cxgn/sgn/t/data target: /home/production/cxgn/sgn/t/data + - shared_data:/downloads ports: - 5900:5900 - 4444:4444 @@ -35,3 +37,6 @@ services: environment: POSTGRES_DB: breedbase POSTGRES_PASSWORD: postgres + +volumes: + shared_data: diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 12b1f78..647f4c6 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -3,7 +3,7 @@ services: build: context: . cache_from: - - breedbase/breedbase:v0.54 + - breedbase/breedbase:latest environment: HOME: /root MODE: 'TESTING' @@ -19,6 +19,7 @@ services: - ./cxgn:/home/production/cxgn # repos/sgn/sgn_test.conf assumes /home/vagrant - ./.git:/home/production/.git + - shared_data:/downloads command: ["t/unit", "t/unit_fixture", "t/unit_mech"] networks: - test-breedbase @@ -34,6 +35,7 @@ services: - type: bind source: ./cxgn/sgn/t/data target: /home/production/cxgn/sgn/t/data + - shared_data:/downloads ports: - 5900:5900 - 4444:4444 @@ -49,5 +51,8 @@ services: networks: - test-breedbase +volumes: + shared_data: + networks: test-breedbase: diff --git a/docker-compose.yml b/docker-compose.yml index 8cfb5ff..3802c97 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,6 @@ services: - webdata:/home/production/volume ports: - 8080:8080 - - 25:25 image: breedbase/breedbase:latest depends_on: - breedbase_db diff --git a/entrypoint.sh b/entrypoint.sh index 92b3b87..0329234 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -8,6 +8,8 @@ chown 106 /etc/munge/munge.key /etc/init.d/slurmd start #/etc/init.d/postgres start +chown root /etc/crontab # in case it was mounted from local dir + if [ "${MODE}" = 'TESTING' ]; then exec perl t/test_fixture.pl --carpalways -v "${@}" fi @@ -18,7 +20,7 @@ umask 002 echo "CHECKING IF A DATABASE NEEDS TO BE INSTALLED..."; -if [ $(psql -h ${PGHOST} -U postgres -d postgres -Atc 'select count(distinct table_schema) from information_schema.tables;') == "2" ]; then +if [[ $(psql -lqt -h ${PGHOST} -U ${PGUSER} | cut -d '|' -f1 | sed 's/^[[:blank:]]*//;s/[[:blank:]]*$//;' | grep -w breedbase ) = '' ]]; then echo "INSTALLING DATABASE..."; echo "CREATING web_usr..."; psql -d postgres -c "CREATE USER web_usr PASSWORD 'postgres';" @@ -116,3 +118,8 @@ else chmod 777 /var/log/sgn/error.log tail -f /var/log/sgn/error.log fi + +# for unigene page, compile drawcontig align program +#cd /home/production/cxgn/sgn/programs +#make +#cd /home/production/cxgn/sgn diff --git a/starmachine.conf b/starmachine.conf index e8db461..c598505 100644 --- a/starmachine.conf +++ b/starmachine.conf @@ -2,7 +2,7 @@ root_dir = /home/production/cxgn/starmachine env[CATALYST_CONFIG] = /etc/starmachine -env[PERL5LIB] = /home/production/cxgn/biosource/lib:/home/production/cxgn/sgn/lib:/home/production/cxgn/cxgn-corelibs/lib:/home/production/cxgn/tomato_genome/lib:/home/production/cxgn/ITAG/lib:/home/production/cxgn/Cview/lib:/home/production/cxgn/Phenome/lib:/home/production/cxgn/local-lib/lib:/home/production/cxgn/local-lib/lib/perl5:/home/production/cxgn/local-lib/bin +env[PERL5LIB] = /home/production/cxgn/bio-chado-schema/lib:/home/production/cxgn/biosource/lib:/home/production/cxgn/sgn/lib:/home/production/cxgn/cxgn-corelibs/lib:/home/production/cxgn/tomato_genome/lib:/home/production/cxgn/ITAG/lib:/home/production/cxgn/Cview/lib:/home/production/cxgn/Phenome/lib:/home/production/cxgn/local-lib/lib:/home/production/cxgn/local-lib/lib/perl5:/home/production/cxgn/local-lib/bin sgn[env][CATALYST_CONFIG] = /home/production/cxgn/sgn/sgn.conf sgn[app_dir] = /home/production/cxgn/sgn sgn[psgi_file] = bin/sgn.psgi