Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmueller authored Dec 7, 2024
0 parents commit b60e1be
Show file tree
Hide file tree
Showing 11 changed files with 540,562 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 codingstrand

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

Use this repo to create repos for other sites.
1 change: 1 addition & 0 deletions bash_history
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
perl db/run_all_patches.pl -u postgres -p postgres -h breedbase_db -d breedbase -e admin
47 changes: 47 additions & 0 deletions breedbase_nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#
server {

listen 80;

root /var/www/html;

server_name sample.breedbase.org;

client_max_body_size 1G;

location ~/brapi/ {
auth_basic "off";
proxy_read_timeout 100m;
proxy_pass http://127.0.0.1:8080;
}

location ~/user/login {
auth_basic "off";
proxy_pass http://127.0.0.1:8080;
}

location ~/.well-known/openid-configuration {
auth_basic "off";
proxy_pass http://127.0.0.1:8080;
}

location ~/brapi/authorize {
auth_basic "off";
proxy_pass http://127.0.0.1:8080;
}



location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_read_timeout 100m;
auth_basic "Restricted - Authorized Users Only";
auth_basic_user_file /etc/nginx/.htpasswd;
}


}

21 changes: 21 additions & 0 deletions crontab
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#

### BREEDBASE SPECIFIC CRONTAB ENTRIES:
#
30 00 * * * root /db_dumps/dump

###* * * * * root date
43 changes: 43 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: "3.7"

services:
breedbase:
image: breedbase/breedbase:latest
depends_on:
- breedbase_db
container_name: breedbase_web
ports:
- 8080:8080
volumes:
- webdata:/home/production/volume
- type: bind
source: /home/production/basesite/empty_db_without.test_users.sql
target: /home/production/empty_dump.sql
# - type: bind
# source: /home/production/sgn
# target: /home/production/cxgn/sgn
- type: bind
source: /home/production/basesite/sgn_local.conf
target: /home/production/cxgn/sgn/sgn_local.conf
- type: bind
source: /home/production/db_dumps
target: /db_dumps
- type: bind
source: /home/production/basesite/crontab
target: /etc/crontab
- type: bind
source: bash_history
target: /home/production/.bash_history

breedbase_db:
image: breedbase/pg:latest
container_name: breedbase_db
volumes:
- dbdata:/var/lib/postgresql/data

volumes:
webdata:
dbdata:



16 changes: 16 additions & 0 deletions dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

export DATE=`date --iso-8601`;

echo "Dumping breedbase db, $DATE";

rm $HOME/.pgpass

echo "breedbase_db:5432:breedbase:postgres:postgres"> $HOME/.pgpass

chmod 0600 $HOME/.pgpass

ls -al $HOME/.pgpass

pg_dump -h breedbase_db -U postgres -w -d breedbase > /db_dumps/breedbase_$DATE.sql

Loading

0 comments on commit b60e1be

Please sign in to comment.