Skip to content

Commit b518c7f

Browse files
author
Production User
committed
initial commit of basesite.
0 parents  commit b518c7f

8 files changed

+276
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 codingstrand
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
Use this repo to create repos for other sites.

breedbase_nginx.conf

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#
2+
server {
3+
4+
listen 80;
5+
6+
root /var/www/html;
7+
8+
server_name sample.breedbase.org;
9+
10+
client_max_body_size 1G;
11+
12+
location ~/brapi/ {
13+
auth_basic "off";
14+
proxy_read_timeout 100m;
15+
proxy_pass http://127.0.0.1:8080;
16+
}
17+
18+
location ~/user/login {
19+
auth_basic "off";
20+
proxy_pass http://127.0.0.1:8080;
21+
}
22+
23+
location ~/.well-known/openid-configuration {
24+
auth_basic "off";
25+
proxy_pass http://127.0.0.1:8080;
26+
}
27+
28+
location ~/brapi/authorize {
29+
auth_basic "off";
30+
proxy_pass http://127.0.0.1:8080;
31+
}
32+
33+
34+
35+
location / {
36+
proxy_pass http://127.0.0.1:8080;
37+
proxy_set_header X-Real-IP $remote_addr;
38+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
39+
proxy_set_header Host $host;
40+
proxy_read_timeout 100m;
41+
auth_basic "Restricted - Authorized Users Only";
42+
auth_basic_user_file /etc/nginx/.htpasswd;
43+
}
44+
45+
46+
}
47+

crontab

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# /etc/crontab: system-wide crontab
2+
# Unlike any other crontab you don't have to run the `crontab'
3+
# command to install the new version when you edit this file
4+
# and files in /etc/cron.d. These files also have username fields,
5+
# that none of the other crontabs do.
6+
7+
SHELL=/bin/sh
8+
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
9+
10+
# m h dom mon dow user command
11+
17 * * * * root cd / && run-parts --report /etc/cron.hourly
12+
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
13+
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
14+
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
15+
#
16+
17+
### BREEDBASE SPECIFIC CRONTAB ENTRIES:
18+
#
19+
30 00 * * * root /db_dumps/dump
20+
21+
###* * * * * root date

docker-compose.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
version: "3.7"
2+
3+
services:
4+
breedbase:
5+
image: breedbase/breedbase:v0.70
6+
depends_on:
7+
- breedbase_db
8+
container_name: breedbase_web
9+
ports:
10+
- 8080:8080
11+
- 25:25
12+
volumes:
13+
- webdata:/home/production/volume
14+
- type: bind
15+
source: /home/production/basesite/empty_db_without.test_users.sql
16+
target: /home/production/empty_dump.sql
17+
# - type: bind
18+
# source: /home/production/sgn
19+
# target: /home/production/cxgn/sgn
20+
- type: bind
21+
source: /home/production/basesite.breedbase.org/sgn_local.conf
22+
target: /home/production/cxgn/sgn/sgn_local.conf
23+
- type: bind
24+
source: /home/production/db_dumps
25+
target: /db_dumps
26+
- type: bind
27+
source: /home/production/basesite/crontab
28+
target: /etc/crontab
29+
30+
breedbase_db:
31+
image: breedbase/pg:latest
32+
container_name: breedbase_db
33+
volumes:
34+
- dbdata:/var/lib/postgresql/data
35+
36+
volumes:
37+
webdata:
38+
dbdata:
39+
40+
41+

dump

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
export DATE=`date --iso-8601`;
4+
5+
echo "Dumping breedbase db, $DATE";
6+
7+
rm $HOME/.pgpass
8+
9+
echo "breedbase_db:5432:breedbase:postgres:postgres"> $HOME/.pgpass
10+
11+
chmod 0600 $HOME/.pgpass
12+
13+
ls -al $HOME/.pgpass
14+
15+
pg_dump -h breedbase_db -U postgres -w -d breedbase > /db_dumps/breedbase_$DATE.sql
16+

firewall

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# Firewall that will prevent port 8080 and 5432 to be accessible from the outside world
4+
5+
echo "1" > /proc/sys/net/ipv4/ip_forward
6+
7+
iptables -I FORWARD -p tcp ! -i 0.0.0.0 --dport 8080 -j DROP # 8080 only accessible through localhost
8+
iptables -I FORWARD -p tcp ! -i 0.0.0.0 --dport 5432 -j DROP # postgres only accessible through localhost

sgn_local.conf

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
dbhost breedbase_db
2+
dbname breedbase
3+
dbuser postgres
4+
dbpass postgres
5+
6+
rootpath /home/production/cxgn
7+
basepath /home/production/cxgn/sgn
8+
9+
#composable_cvs trait,toy # see below
10+
#composable_cvs_allowed_combinations Time Series|trait+toy
11+
12+
homepage_files_dir /home/production/volume/public/static_content
13+
14+
trial_download_logfile /home/production/volume/logs/cassava_trial_download_log
15+
static_datasets_url /data
16+
disable_login 0
17+
brapi_require_login 0
18+
require_login 1
19+
20+
www_user www-data
21+
www_group www-data
22+
23+
contact_form_email [email protected]
24+
25+
error_log /var/log/sgn/error.log
26+
access_log /var/log/sgn/access.log
27+
28+
python_executable python3
29+
30+
preferred_species Manihot esculenta
31+
32+
production_server 1
33+
image_dir /images/
34+
image_path /home/production/volume/public/images/
35+
cluster_shared_tempdir /home/production/volume/tmp
36+
tempfiles_base /home/production/volume/tmp/breedbase-site
37+
static_datasets_path /home/production/volume/public
38+
static_content_url /static_content
39+
static_content_path /home/production/volume/public/static_content
40+
41+
main_production_site_url https://sample.breedbase.org
42+
43+
# github token for contact form
44+
github_access_token 96d462a40bc3504f4768559e752f7eec16ff2bc1
45+
46+
#Homepage controller customization
47+
homepage_display_phenotype_uploads 0
48+
49+
# jbrowse path
50+
jbrowse_path /jbrowse_cassavabase/?data=data/json
51+
52+
#path for archving uploaded files
53+
archive_path /home/production/volume/archive/breedbase/
54+
55+
default_genotyping_protocol "GBS ApeKI Cassava genome v6_Oct2015"
56+
#default_genotyping_protocol "GBS ApeKI Cassava genome v5"
57+
58+
identifier_prefix BB
59+
project_name Sample
60+
cview_db_backend Cassava
61+
62+
# slurm config
63+
backend Slurm
64+
cluster_host ""
65+
cache_file_path /home/production/volume/cache
66+
solgs_dir /home/production/tmp/solgs/__USERNAME__
67+
68+
trait_ontology_db_name CO_322
69+
70+
trait_cv_name maize_trait
71+
72+
#For display on onto tree
73+
#onto_root_namespaces NO (NCSU_ontology), GO (Gene Ontology), PO (Plant Ontology), SO (Sequence Ontology), PATO (Phenotype and Trait Ontology)
74+
#onto_root_namespaces CO_334 (Cassava Trait Ontology), GO (Gene Ontology), PO (Plant Ontology), SO (Sequence Ontology), PATO (Phenotype and Trait Ontology), DL_001 (Dawson Lab Ontology), TO (Time Ontology)
75+
onto_root_namespaces CO_322 (Maize Trait)
76+
77+
#For display on trait search
78+
trait_variable_onto_root_namespaces CO_322 (Maize Trait), COMP (Composed Variables)
79+
80+
composable_cvs trait,attribute
81+
composable_cvs_allowed_combinations trait+attribute+toy
82+
83+
<Controller::Cview>
84+
cview_default_map_id 1
85+
</Controller::Cview>
86+
87+
r_qtl_temp_path /export/prod/tmp/solqtl___USERNAME__
88+
89+
submit_dir /home/production/public/submit-uploads
90+
91+
blast_path ""
92+
blast_db_path /home/production/volume/blast/databases/current
93+
94+
# path to our production_ftp site
95+
#
96+
ftpsite_root /home/production/volume/public
97+
98+
<View::Mason>
99+
add_comp_root /home/production/cxgn/auburn/mason
100+
</View::Mason>
101+
102+
<DatabaseConnection sgn_test>
103+
dsn dbi:Pg:host=localhost;dbname=cxgn
104+
user postgres
105+
password <your postgres user password>
106+
107+
search_path public
108+
search_path sgn
109+
search_path annotation
110+
search_path genomic
111+
search_path insitu
112+
search_path metadata
113+
search_path pheno_population
114+
search_path phenome
115+
search_path physical
116+
search_path tomato_gff
117+
search_path biosource
118+
search_path gem
119+
120+
</DatabaseConnection>

0 commit comments

Comments
 (0)