-
Notifications
You must be signed in to change notification settings - Fork 0
/
const.sh
114 lines (97 loc) · 2.73 KB
/
const.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# bash coloring helpers
username=${USER}
END_C="\e[0m"
RED="\e[91m"
L_CYAN="\e[96m"
BOLD_GREEN="\e[1;32m"
L_YELL="\e[93m"
GREEN="\e[32m"
BOLD="\e[1m"
SHDOL=${GREEN}${BOLD}"$"${END_C}" "
function print_and_do(){
echo -e $SHDOL$1
eval $1
}
function print_already(){
echo -e $L_YELL"Already exists : "$1${END_C}
}
function print_created(){
echo -e $L_CYAN"created : "$1${END_C}
}
function create_if_non_existent(){ # arg1 is folder to test, arg2 is a folder, or space separated list to pass to mkdir
# second arg is optional and will be filled with first if absent
sec="$2"
if [ "" = "${sec}" ]; then
sec="$1"
fi
# creates folders if non existent
if [ ! -d "$1" ] ; then
mkdir -p ${sec} && \
print_created ${sec}
else
print_already $1
fi
}
# # # # # # # #
# env defined #
# # # # # # # #
# GIT
git_url_base="https://github.com"
git_user_name="Fclem"
git_repo_name="isbio2"
git_ssh_url="[email protected]:${git_user_name}"
breeze_static_repo_name="breeze-static"
breeze_r_code_repo_name="DSRT-v2"
# DOCKER SOURCES
apt_docker_key_server="hkp://ha.pool.sks-keyservers.net:80"
apt_docker_key_id="58118E89F3A912897C070ADBF76221572C52609D"
apt_docker_repo="https://apt.dockerproject.org/repo"
# CONTAINERS NAMES
# empty file with these name will be created for bash auto completion while using docker start/attach etc.
ssh_cont_name='breeze-ssh'
breeze_cont_name='breeze-one'
mysql_cont_name='breeze-sql'
breezedb_cont_name='breeze-db'
nginx_cont_name='breeze-nginx'
shiny_cont_name='breeze-shiny'
# SSH RELATED CONFIGS
ssh_image='kingsquare/tunnel:forward'
ssh_user='breeze'
ssh_server='10.0.1.4'
ssh_local_port='3945'
ssh_forwarded_ip='127.0.0.1'
ssh_remote_port='4243'
# SHINY CONFIGS
shiny_container_folder='/srv/shiny-server/' # shiny's path in the container
shiny_image='fimm/shiny' # an un-edited copy of default docker shiny image
# MYSQL CONFIGS
mysql_image='fimm/mysql' # an un-edited copy of default docker mysql image
mysql_secret_file='.mysql_root_secret'
mysql_init_file='./breeze.sql'
# FOLDER STRUCTURE CONFIGS
static_source_name='static_source'
home_folder="/root"
docker_project_folder="/projects/breeze"
rel_shiny_folder="../shiny"
rel_breezedb_folder="../breeze-db"
code_ln="code"
# RUN MODES
run_mode_dev='dev'
run_mode_pharma='pharma'
run_mode_ph_dev='pharma_dev'
run_mode_prod='prod'
# ENV CONFS
env_azure='azurecloud'
env_fimm='fimm'
site_name=''
locale_gen='en_US.UTF-8'
time_zone="Europe/Helsinki"
# GPG
GPG_key_server="hkp://keyserver.ubuntu.com:80" # using port 80 prevents issues with oubound firewall
clem_GPG_id="B4A7FF8614ED9842"
alks_GPG_id="DFDAF03DA18C9EE8"
# nginx
nginx_static_base="/www/data" # user for NGINX
nginx_static_mount="${nginx_static_base}/static"
nginx_report_cache_mount="/www/data/reports/"
# init.sh generated :