diff --git a/.gitignore b/.gitignore index e05ceb4..610b754 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ supervisord* .phpunit.* mkdocs/site +*.DS_STORE diff --git a/Dockerfile b/Dockerfile index aa13bf0..537d336 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,10 @@ ARG phpversion='8.3' ARG pgsqlversion="16" FROM tripalproject/tripaldocker:drupal${drupalversion}-php${phpversion}-pgsql${pgsqlversion}-noChado +LABEL org.opencontainers.image.source=https://github.com/tripal/tripal_blast +LABEL org.opencontainers.image.description="Provides a demonstration of the Tripal BLAST module installed in the most recent version of Tripal 4" +LABEL org.opencontainers.image.licenses=GPL-3.0-or-later + COPY . /var/www/drupal/web/modules/contrib/tripal_blast ## Install NCBI Blast+. diff --git a/mkdocs/docs/images/TripalLogo_only.png b/mkdocs/docs/images/TripalLogo_only.png new file mode 100644 index 0000000..9e504e5 Binary files /dev/null and b/mkdocs/docs/images/TripalLogo_only.png differ diff --git a/mkdocs/docs/install/composer-install.md b/mkdocs/docs/install/composer-install.md index 4ad8b4e..643d9d0 100644 --- a/mkdocs/docs/install/composer-install.md +++ b/mkdocs/docs/install/composer-install.md @@ -4,3 +4,21 @@ !!! warning "Under Development" This documentation is still being developed as this module is being upgraded. + +This module should be download via composer; however, we don't yet have that setup. + +In the meantime, you can install this module in an existing Drupal/Tripal site as follows: + +1. Download the current module code to the appropriate place in your site. This can be done by replacing DRUPALROOT with the full path to your drupal site. For example, `/var/www/drupal/web`. +``` +cd DRUPALROOT/modules/contrib +git clone https://github.com/tripal/tripal_blast +``` +2. Enable the module in your site. This can be done on the command line via Drush or through the UI by going to Administration Toolbar > Extend and selecting the checkbox beside Tripal BLAST before clicking "Install". +``` +drush en tripal_blast +``` + +!!! note "Process once Composer is available" + + Once composer install is available, it will be as easy as following the composer instructions on your site to add Tripal BLAST to your composer.json without having composer download it since it is already there. diff --git a/mkdocs/docs/install/docker-demo.md b/mkdocs/docs/install/docker-demo.md index 40b31fe..a231155 100644 --- a/mkdocs/docs/install/docker-demo.md +++ b/mkdocs/docs/install/docker-demo.md @@ -1,6 +1,55 @@ # Trying out Tripal BLAST with Docker -!!! warning "Under Construction" +Tripal BLAST comes with a docker file/image to provide a quick and easy way to checkout the module, as well as, to provide an easy way to contribute fixes/functionality. - This documentation is still being developed as this module is being upgraded. +!!! note "Requirements" + + If you don't yet have docker installed on your system there are instructions for installation here in the [Official Docker Documentation](https://docs.docker.com/engine/install/). If you are using MacOS or Windows, I highly recommend Docker Desktop (as a daily Mac user). The links to Docker desktop are in the official install documentation linked previously. + +## Tripal BLAST Demo + +We have already built the docker image for the Tripal BLAST demo and provided it on GitHub. You can run it locally as follows: + +1. Pull the demo image from Github +``` +docker pull ghcr.io/tripal/tripal_blast:demo +``` +2. Use the run command to create a local container which will house the entire Tripal site and Tripal BLAST demonstration. +``` +docker run -tid --name=TripalBLASTDemo --publish=80:80 ghcr.io/tripal/tripal_blast:demo +docker exec TripalBLASTDemo service postgresql restart +``` +3. Go to http://localhost in your browser of choice and login in using the [Administrative username and password for the Tripal Docker](https://tripaldoc.readthedocs.io/en/latest/install/docker.html#development-site-information). + +You now have a fully functional Tripal site with Tripal BLAST and NCBI Blast+ command-line utilities installed. + +## Using Docker to Contribute + +We would Love to collaborate with you! To use docker to spin up a development environment for Tripal BLAST we recommend building the demonstration image locally and then running a container that mounts your current git clone of our repository inside the container. This allows you to make code changes to the local git clone and see them immediately reflected within the image for testing purposes! + +1. Using Github, make a fork of our repository by going to the following URL while logged into github: https://github.com/tripal/tripal_blast/fork or by clicking on "Fork" on our repository. +2. Clone your fork locally. We will use the main repository URL below but **you should substitute the URL of your fork here**. +``` +mkdir ~/Dockers +cd ~/Dockers +git clone https://github.com/tripal/tripal_blast +cd tripal_blast +``` +3. Create a branch for your contributions. When you eventually make a PR, you can commit to this branch to update the PR based on suggestions. This is why we recommend you not use the main branch of your repository. You can name the branch whatever you want (we used `my-feature-or-fix` in the below example). +``` +git checkout -b my-feature-or-fix +``` +4. Build the docker demonstration image. +``` +docker build --tag=tripalBlast:local ./ +``` +5. Create a container from the previous image in your current directory. The `--volume` part of this command will mount your current directory to the appropriate place inside the container. +``` +docker run --publish=80:80 -tid --name=tripalBlast --volume=`pwd`:/var/www/drupal/web/modules/contrib/tripal_blast tripalBlast:local +docker exec tripalBlast service postgresql restart +``` + +Now you can interact with the Tripal site in your browser in all the same ways you would a regular Tripal site by going to https://localhost and logging in using the [Administrative username and password for the Tripal Docker](https://tripaldoc.readthedocs.io/en/latest/install/docker.html#development-site-information). + +You can also edit the files in your local git clone directly with the editor of your choice (e.g. VSCode or vim) and see the changes reflected immediately in the site. diff --git a/mkdocs/mkdocs.yml b/mkdocs/mkdocs.yml index e01d4c7..27f4255 100644 --- a/mkdocs/mkdocs.yml +++ b/mkdocs/mkdocs.yml @@ -81,6 +81,8 @@ markdown_extensions: theme: name: material + logo: images/TripalLogo_only.png + favicon: images/TripalLogo_only.png palette: - media: "(prefers-color-scheme: light)" scheme: default