https://github.com/breeding-insight/bi-docker-stack
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.8%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: Breeding-Insight
- Language: Shell
- Default Branch: develop
- Size: 321 KB
Statistics
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
This repo contains the docker-compose configurations used to run DeltaBreed.
Table of Contents
Getting Started | Architecture | Setting Up Other Environments
Getting Started
Outline
- Download prereqs
- Set up OAuth with ORCID
- Set up environment variables
- Run docker-compose
- Get ORCID credentials into database
- Access DeltaBreed on web
Download Prereqs
Docker and Docker-compose are both required.
Set up OAuth with ORCID
Running DeltaBreed requires setting up OAuth with ORCID (Open Researcher and Contributor ID).
- Create an ORCID account
- Sign into ORCID
- Go to "Developer Tools"
- Agree to Terms of Service and register for ORCID public API credentials
- Enter application name and description (no particular requirements)
- Enter application URL
http://deltabreed.localhost:8080 - Add Redirect URI
http://deltabreed.localhost/sso/success/orcid - Select "Save application" at the bottom of the page
- Copy the generated Client ID and Client Secret to add to the .env file (see Set up environment variables)
Set up environment variables
To set necessary private environment variables for DeltaBreed to run, at the root level of the repo locally create a file called .env.
A template exists named .env.template that has most environment variables already filled.
In this new .env based off the template, set OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET to the generated Client ID and Client Secret copied in the previous step
Run docker-compose
Run the following in the bi-docker-stack repository
docker-compose -f docker-compose.yml -f docker-compose-redis.yml -f docker-compose-gigwa.yml -f docker-compose-localstack.yml -f docker-compose-mailhog.yml -f docker-compose-qa.yml up -d --build
Get ORCID credentials into database
To get ORCID credentials into the database, an interactive script must be run that prompts the user to input their ORCID and email.
For Mac/Linux, run addUser.sh
For Windows, run addUser.ps1
Access DeltaBreed on web
DeltaBreed can then be accessed via http://deltabreed.localhost:8080.
Architecture
The primary components of DeltaBreed are the Web UI (Breeding-Insight/bi-web) and the API (Breeding-Insight/bi-api). The BrAPI Java Server is used for phenotypic data storage, Gigwa is used for genotypic data storage, and interoperability with external applications such as Field Book is enabled by BrAPI. DeltaBreed uses ORCID for authentication.

Setting up Other Environments
Development Environment
To run a development environment, you will need to initialize the git submodules that exist within this repository:
git submodule update --init --recursive
Then run:
docker-compose -f docker-compose.yml -f docker-compose-redis.yml -f docker-compose-gigwa.yml -f docker-compose-dev.yml up -d
Production Environment
An instance of Redis and Gigwa are expected to be running. The .env file must be updated to reflect where these services live. To stand up instances of Redis or Gigwa, please refer to their respective docker-compose files (docker-compose-redis.yml, docker-compose-gigwa.yml)
docker-compose up -d
Pre-Production Environment
docker-compose -f docker-compose.yml -f docker-compose-redis.yml -f docker-compose-gigwa.yml -f docker-compose-qa.yml -f docker-compose-rc.yml up -d
QA Environment
docker-compose -f docker-compose.yml -f docker-compose-redis.yml -f docker-compose-gigwa.yml -f docker-compose-qa.yml up -d
AWS S3 Configuration
If running in production, then you will need to create an AWS IAM role to generate an access key and secret. You will also need to define a bucket in S3 to hold the data.
If you do not want to use AWS, you can utilize the localstack configuration by including -f docker-compose-localstack.yml in your docker-compose up command.
Then values for the AWS parameters can be set as follows:
AWS_ACCESS_KEY_ID=test
AWS_SECRET_KEY=test
AWS_S3_ENDPOINT=http://localhost:4566
TLS Support
In a deployment environment TLS support can be easily provided by the reverse
proxy container which already has Certbot by LetsEncrypt installed. The
deployment environment should set the value of the environment variable
REGISTERED_DOMAIN to the value of the registered domain for deployed instance.
NOTE* This environment variable should be added to your .env file
Bash into the docker container named biproxy and call Certbot.
docker exec -it biproxy bash
certbot --nginx -d <REGISTERED_DOMAIN>
Certbot will ask a series of questions to be answered interactively, then automatically install the TLS certs and update the nginx config files.
Reverse Proxy
The nginx config files and TLS certs are stored on volumes mounted on the host machine, ensuring that TLS will continue to be used even after restarting the docker stack after code updates. However, this also means that a volume must be removed before restarting the stack if there are updates to the configuration of the reverse proxy.
The Dockerfile for the reverse proxy contains the nginx rules used to direct traffic to the appropriate upstream server. Any new features added to bi-api that use an endpoint not in the /v1/ or /sso/ name spaces must have a rule added to the proxy config in order to send these requests upstream.
User Configuration
The containers are not run by the root user but by a new user and group called
'host'. The user and group ids for host are both set to 1001 by default. If
you wish to change these to your own user and group ids, add the following
contents to .env:
USER_ID=1001
GROUP_ID=1001
Change 1001 to your own id values. You can find at the console your user and group ids using the id command:
for user id
id -u
and for group id
id -g
Owner
- Name: Breeding Insight
- Login: Breeding-Insight
- Kind: organization
- Website: https://breedinginsight.org
- Repositories: 12
- Profile: https://github.com/Breeding-Insight
Combining genomics and informatics to accelerate genetic gains.
GitHub Events
Total
- Delete event: 1
- Member event: 1
- Issue comment event: 1
- Push event: 74
- Pull request review comment event: 5
- Pull request review event: 15
- Pull request event: 11
- Create event: 7
Last Year
- Delete event: 1
- Member event: 1
- Issue comment event: 1
- Push event: 74
- Pull request review comment event: 5
- Pull request review event: 15
- Pull request event: 11
- Create event: 7
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 0
- Total pull requests: 3
- Average time to close issues: N/A
- Average time to close pull requests: about 1 month
- Total issue authors: 0
- Total pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.33
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 3
- Average time to close issues: N/A
- Average time to close pull requests: about 1 month
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.33
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- mlm483 (12)
- jloux-brapi (1)
- dmeidlin (1)
- HMS17 (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- TimonVS/pr-labeler-action v3 composite
- release-drafter/release-drafter v5 composite
- actions/checkout v2 composite
- breedinginsight/biapi develop
- breedinginsight/biweb develop
- breedinginsight/biapi develop
- breedinginsight/biweb develop
- breedinginsight/biapi rc
- breedinginsight/biweb rc
- biproxy latest
- breedinginsight/biapi latest
- breedinginsight/biweb latest
- breedinginsight/brapi-java-server latest
- mailhog/mailhog latest
- postgres 11.4
- redis latest
- breedinginsight/biapi ci
- breedinginsight/biweb ci
- breedinginsight/brapi-java-server develop
- breedinginsight/gigwa latest
- mongo 4.2.21
- localstack/localstack latest
- redis latest