Browse Source

Merge branch 'master' of Trias_Org/elxr into master

production
chess 1 year ago
parent
commit
eec2e11144

+ 0
- 8
trias/DB/mysql_restore.sh View File

DB_USER="root"
DB_PASS="root@123"
DB_NAME="triq_demo"
echo "Enter the name of backup file: "
read folderName
BACKUP_FILE="~/mysql_backup/$folderName"
# Restore backup file
mysql -u $DB_USER -p$DB_PASS $DB_NAME < $BACKUP_FILE

trias/DB/mysql_backup.sh → trias/Database/mysql_backup.sh View File

DB_NAME="triq_demo" DB_NAME="triq_demo"


# Set the backup directory # Set the backup directory
BACKUP_DIR="~/mysql_backup"
BACKUP_DIR="/mysql_backup"


# Set the backup filename format # Set the backup filename format
DATE=$(date +"%Y-%m-%d_%H-%M-%S") DATE=$(date +"%Y-%m-%d_%H-%M-%S")
FILENAME="${DB_NAME}_${DATE}.sql"
FILENAME="${DB_NAME}_${DATE}"


# Create the backup # Create the backup
echo mysqldump -u $DB_USER -p$DB_PASS $DB_NAME > $BACKUP_DIR/$FILENAME
mysqldump -u $DB_USER -p$DB_PASS $DB_NAME > $BACKUP_DIR/$FILENAME mysqldump -u $DB_USER -p$DB_PASS $DB_NAME > $BACKUP_DIR/$FILENAME
# mysqldump -u root -p 'root@123' triq_demo > ~/mysql_backup/temp_1

+ 12
- 0
trias/Database/mysql_restore.sh View File

# Set the database credentials
DB_USER="root"
DB_PASS="root@123"
DB_NAME="triq_demo"

# Set the backup directory
echo "Enter the name of backup file: "
read fileName
BACKUP_FILE="/mysql_backup/$fileName"

# Restore backup file
mysql -u $DB_USER -p$DB_PASS $DB_NAME < $BACKUP_FILE

+ 30
- 13
trias/Server/trias_appserver_script.sh View File

#STORE GIT CREDENTIALS IN CACHE
git config --global credential.helper store
git config --global credential.helper 'store --file ~/.git-credentials'
echo "Enter git username: "
read gitUser
echo "username=$gitUser" >> ~/.git-credentials
echo "Enter git password: "
read gitPassword
echo "password=$gitPassword" >> ~/.git-credentials
chmod 0600 ~/.git-credentials

#INSTALLING NODE JS #INSTALLING NODE JS
cd ~ cd ~
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh
node --version node --version
npm --version npm --version
npm install -g @angular/cli npm install -g @angular/cli
npm install pm2
npm install -g pm2
pm2 install typescript
# echo "Enter the version of node you want to install: (Example. 'v16.19.1')" # echo "Enter the version of node you want to install: (Example. 'v16.19.1')"
# read nodeversion # read nodeversion
# nvm install $nodeversion # nvm install $nodeversion


#ADDING GIT DOMAIN NAME TO HOSTS
# echo "10.10.5.77 git.bbh.org.in" >> /etc/hosts

#PRODUCTION A SETUP #PRODUCTION A SETUP
cd ~ cd ~
cd Desktop cd Desktop
npm i npm i


cd .. cd ..
git clone http://git.bbh.org.in/chess/BBH_Patient_Portal
cd BBH_Patient_Portal
git clone http://git.bbh.org.in/chess/bbh_patient_portal
cd bbh_patient_portal
git checkout production git checkout production
npm i npm i


cd .. cd ..
git clone http://git.bbh.org.in/chess/elixir-config-development
cd elixir-config-development
git clone http://git.bbh.org.in/chess/elixir-config-production
cd elixir-config-production
git checkout production git checkout production
npm i npm i


git checkout production git checkout production
npm i npm i


#TO CREATE SYMLINK
cd ..
ln -s elixir-config-production/ config

#PRODUCTION B SETUP #PRODUCTION B SETUP
cd ~ cd ~
cd Desktop cd Desktop
npm i npm i


cd .. cd ..
git clone http://git.bbh.org.in/chess/BBH_Patient_Portal
cd BBH_Patient_Portal
git clone http://git.bbh.org.in/chess/bbh_patient_portal
cd bbh_patient_portal
git checkout production git checkout production
npm i npm i


cd .. cd ..
git clone http://git.bbh.org.in/chess/elixir-config-development
cd elixir-config-development
git clone http://git.bbh.org.in/chess/elixir-config-production
cd elixir-config-production
git checkout production git checkout production
npm i npm i


git clone http://git.bbh.org.in/chess/processmanager git clone http://git.bbh.org.in/chess/processmanager
cd processmanager cd processmanager
git checkout production git checkout production
npm i
npm i

#TO CREATE SYMLINK
cd ..
ln -s elixir-config-production/ config

+ 17
- 0
trias/trias_app_update.sh View File

#SCRIPT TO PULL LATEST UPDATES AUTOMATICALLY
cd ../project-genesis-backend
git pull

cd ../project-genesis-frontend
git pull

cd ../bbh_patient_portal
git pull

cd ../elixir-config-production
git pull

cd ../processmanager
git pull

pm2 reload all

Loading…
Cancel
Save