diff --git a/applyLastBackup.sh b/applyLastBackup.sh new file mode 100755 index 0000000..7d05720 --- /dev/null +++ b/applyLastBackup.sh @@ -0,0 +1,62 @@ +echo '-------' +echo 'Starting Database Restore' +echo '-------' + +#get Latest database backup + +# Unzip File +# gzip -dk file.gz + +source ~/.env + +echo "$PROD_DB_PASS" + +BACKUPDIR="/home/mab/databaseBackupSolidScribe" + +mkdir -p $BACKUPDIR +cd $BACKUPDIR + +# -t sort by modification time, newest first +# -A --almost-all, do not list implied . and .. +LASTZIPPEDFILE=$(ls -At *.gz | head -n1) + +# -k keep file after unzip +# -d Decompress +# -v verbose +echo "Unzipping $LASTZIPPEDFILE" +gunzip -dkv $LASTZIPPEDFILE + +BACKUPFILE=$(ls -At *.sql | head -n1) + +#Fix to replace incompatible DB type +echo "Updating table name in -> $BACKUPFILE" +#sed -i $BACKUPFILE -e 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g' + +#Fix encoding for dev DB and exclude system tables +# sed -i 's/utf8mb4_0900_ai_ci/utf8mb4_general_ci/g' $BACKUPFILE +# sed -r '/INSERT INTO `(sys|mysql)`/d' $BACKUPFILE > $BACKUPFILE + +#echo "Removing and syncing static files" +#rm -r /home/mab/ss/staticFiles/* +#rsync -e 'ssh -p 13328' -hazC --update mab@45.79.41.75:/home/mab/pi/staticFiles /home/mab/ss/ + +echo "Updating Database" +mysql -u root --password="$PROD_DB_PASS" < $BACKUPFILE + +## Optimize Database Tables +# mysqlcheck --all-databases +mysqlcheck --all-databases -o -u root --password="$PROD_DB_PASS" #--silent +# mysqlcheck --all-databases --auto-repair +# mysqlcheck --all-databases --analyze + +# Fix an issues with DB after messing around with it +mysql_upgrade -u root --password="$PROD_DB_PASS" + +#clean up extracted and modified SQL dumps +rm *.sql + + + +echo '-------' +echo "Applied Prod database to Dev. LastFile: $BACKUPFILE" +echo '-------' diff --git a/applyProdDatabaseToDev.sh b/applyProdDatabaseToDev.sh index 222118a..68f8ee8 100755 --- a/applyProdDatabaseToDev.sh +++ b/applyProdDatabaseToDev.sh @@ -1,5 +1,3 @@ -#!/bin/bash - echo '-------' echo 'Starting Database Restore' echo '-------' @@ -12,7 +10,7 @@ echo '-------' BACKUPDIR="/home/mab/databaseBackupSolidScribe" #DEVDBPASS="Crama!Lama*Jamma###88383!!!!!345345956245i" #DEVDBPASS="RootPass1234!" -DEVDBPASS="ReallySecureRootPass123!" +DEVDBPASS="LetsKeepOut69FatHorses!" # LazaLinga&33Can't!Do!That34 cd $BACKUPDIR @@ -39,14 +37,14 @@ sed -r '/INSERT INTO `(sys|mysql)`/d' $BACKUPFILE > $BACKUPFILE echo "Removing and syncing static files" rm -r /home/mab/ss/staticFiles/* -rsync -e 'ssh -p 13328' -hazC --update mab@solidscribe.com:/home/mab/pi/staticFiles /home/mab/ss/ +rsync -e 'ssh -p 13328' -hazC --update mab@45.79.41.75:/home/mab/pi/staticFiles /home/mab/ss/ echo "Updating Database" mysql -u root --password="$DEVDBPASS" < $BACKUPFILE ## Optimize Database Tables # mysqlcheck --all-databases -mysqlcheck --all-databases -o -u root --password="$DEVDBPASS" --silent +mysqlcheck --all-databases -o -u root --password="$DEVDBPASS" #--silent # mysqlcheck --all-databases --auto-repair # mysqlcheck --all-databases --analyze diff --git a/backupDatabase.sh b/backupDatabase.sh index 5be9541..96a29fd 100755 --- a/backupDatabase.sh +++ b/backupDatabase.sh @@ -1,7 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash # Take all variables in .env and turn them into local variables for this script -source ~/.env +source /home/mab/.env BACKUPDIR="/home/mab/databaseBackupSolidScribe" @@ -9,7 +9,7 @@ mkdir -p $BACKUPDIR cd $BACKUPDIR NOW=$(date +"%Y-%m-%d_%H-%M") -ssh mab@solidscribe.com -p 13328 "mysqldump --all-databases --single-transaction --user root -p$PROD_DB_PASS" > "backup-$NOW.sql" +mysqldump --all-databases --single-transaction --user root --password="$PROD_DB_PASS" > "backup-$NOW.sql" gzip "backup-$NOW.sql" # cp "backup-$NOW.sql" "/mnt/Windows Data/DatabaseBackups/backup-$NOW.sql" @@ -17,7 +17,7 @@ gzip "backup-$NOW.sql" echo "Database Backup Complete on $NOW" # Delete all but last 8 files -ls -tp | grep -v '/$' | tail -n +9 | tr '\n' '\0' | xargs -0 rm -- +#ls -tp | grep -v '/$' | tail -n +9 | tr '\n' '\0' | xargs -0 rm -f -- ## # Restore DB diff --git a/buildAndUpdateProd.sh b/buildAndUpdateProd.sh index a7e2679..cc773c2 100755 --- a/buildAndUpdateProd.sh +++ b/buildAndUpdateProd.sh @@ -18,14 +18,14 @@ tar -czf release.tar.gz server node_modules client/dist staticFiles/assets #send compressed release to remote machine echo -e "\e[32m\nMoving compressed release to production... \n\e[0m" -rsync -e 'ssh -p 13328' -havzC --update release.tar.gz mab@solidscribe.com:/home/mab/pi/ +rsync -e 'ssh -p 13328' -havzC --update release.tar.gz mab@45.79.41.75:/home/mab/pi/ # Remove Release from local after its been uploaded rm release.tar.gz #uncompress release on server echo -e "\e[32m\nExtracting release on production... \n\e[0m" -ssh mab@solidscribe.com -p 13328 "cd /home/mab/pi/; rm -r server node_modules client; tar -xzf *.tar.gz --overwrite; rm *.tar.gz; pm2 reload all" +ssh mab@45.79.41.75 -p 13328 "cd /home/mab/pi/; rm -r server node_modules client; tar -xzf *.tar.gz --overwrite; rm *.tar.gz; pm2 reload all" #Congratulate how awesome you are echo -e "\e[32m\nRelease Complete! Nice Work! \n\e[0m" \ No newline at end of file diff --git a/client/package-lock.json b/client/package-lock.json index 052de68..5db380c 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -3547,9 +3547,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001418", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001418.tgz", - "integrity": "sha512-oIs7+JL3K9JRQ3jPZjlH6qyYDp+nBTCais7hjh0s+fuBwufc7uZ7hPYMXrDOJhV360KGMTcczMRObk0/iMqZRg==", + "version": "1.0.30001651", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz", + "integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==", "dev": true, "funding": [ { @@ -3559,6 +3559,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -12823,9 +12827,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001418", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001418.tgz", - "integrity": "sha512-oIs7+JL3K9JRQ3jPZjlH6qyYDp+nBTCais7hjh0s+fuBwufc7uZ7hPYMXrDOJhV360KGMTcczMRObk0/iMqZRg==", + "version": "1.0.30001651", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz", + "integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==", "dev": true }, "case-sensitive-paths-webpack-plugin": { diff --git a/client/public/img/icons/android-chrome-192x192.png b/client/public/img/icons/android-chrome-192x192.png new file mode 100644 index 0000000..b02aa64 Binary files /dev/null and b/client/public/img/icons/android-chrome-192x192.png differ diff --git a/client/public/img/icons/android-chrome-512x512.png b/client/public/img/icons/android-chrome-512x512.png new file mode 100644 index 0000000..06088b0 Binary files /dev/null and b/client/public/img/icons/android-chrome-512x512.png differ diff --git a/client/public/img/icons/android-chrome-maskable-192x192.png b/client/public/img/icons/android-chrome-maskable-192x192.png new file mode 100644 index 0000000..791e9c8 Binary files /dev/null and b/client/public/img/icons/android-chrome-maskable-192x192.png differ diff --git a/client/public/img/icons/android-chrome-maskable-512x512.png b/client/public/img/icons/android-chrome-maskable-512x512.png new file mode 100644 index 0000000..5f2098e Binary files /dev/null and b/client/public/img/icons/android-chrome-maskable-512x512.png differ diff --git a/client/public/img/icons/apple-touch-icon-120x120.png b/client/public/img/icons/apple-touch-icon-120x120.png new file mode 100644 index 0000000..1427cf6 Binary files /dev/null and b/client/public/img/icons/apple-touch-icon-120x120.png differ diff --git a/client/public/img/icons/apple-touch-icon-152x152.png b/client/public/img/icons/apple-touch-icon-152x152.png new file mode 100644 index 0000000..f24d454 Binary files /dev/null and b/client/public/img/icons/apple-touch-icon-152x152.png differ diff --git a/client/public/img/icons/apple-touch-icon-180x180.png b/client/public/img/icons/apple-touch-icon-180x180.png new file mode 100644 index 0000000..404e192 Binary files /dev/null and b/client/public/img/icons/apple-touch-icon-180x180.png differ diff --git a/client/public/img/icons/apple-touch-icon-60x60.png b/client/public/img/icons/apple-touch-icon-60x60.png new file mode 100644 index 0000000..cf10a56 Binary files /dev/null and b/client/public/img/icons/apple-touch-icon-60x60.png differ diff --git a/client/public/img/icons/apple-touch-icon-76x76.png b/client/public/img/icons/apple-touch-icon-76x76.png new file mode 100644 index 0000000..c500769 Binary files /dev/null and b/client/public/img/icons/apple-touch-icon-76x76.png differ diff --git a/client/public/img/icons/apple-touch-icon.png b/client/public/img/icons/apple-touch-icon.png new file mode 100644 index 0000000..03c0c5d Binary files /dev/null and b/client/public/img/icons/apple-touch-icon.png differ diff --git a/client/public/img/icons/favicon-16x16.png b/client/public/img/icons/favicon-16x16.png new file mode 100644 index 0000000..42af009 Binary files /dev/null and b/client/public/img/icons/favicon-16x16.png differ diff --git a/client/public/img/icons/favicon-32x32.png b/client/public/img/icons/favicon-32x32.png new file mode 100644 index 0000000..46ca04d Binary files /dev/null and b/client/public/img/icons/favicon-32x32.png differ diff --git a/client/public/img/icons/msapplication-icon-144x144.png b/client/public/img/icons/msapplication-icon-144x144.png new file mode 100644 index 0000000..7808237 Binary files /dev/null and b/client/public/img/icons/msapplication-icon-144x144.png differ diff --git a/client/public/img/icons/mstile-150x150.png b/client/public/img/icons/mstile-150x150.png new file mode 100644 index 0000000..3b37a43 Binary files /dev/null and b/client/public/img/icons/mstile-150x150.png differ diff --git a/client/public/img/icons/safari-pinned-tab.svg b/client/public/img/icons/safari-pinned-tab.svg new file mode 100644 index 0000000..e44c0d5 --- /dev/null +++ b/client/public/img/icons/safari-pinned-tab.svg @@ -0,0 +1,3 @@ + diff --git a/client/public/index.html b/client/public/index.html index 93052cf..73d81d3 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -9,7 +9,8 @@ - + +
{{calendar.monthName}}, {{calendar.year}}
+