Incremental Commit to update backups and use pnpm
This commit is contained in:
1 parent
0b77b0516d
commit
68f71c9d6c
2 files changed
+7
-24
No files matched your search
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
# Take all variables in .env and turn them into local variables for this script
|
# Take all variables in .env and turn them into local variables for this script
|
||||||
source /home/mab/.env
|
source /home/mab/.env
|
||||||
|
|
||||||
BACKUPDIR="/home/mab/databaseBackupSolidScribe"
|
# BACKUPDIR defined in .env
|
||||||
|
|
||||||
mkdir -p $BACKUPDIR
|
mkdir -p $BACKUPDIR
|
||||||
cd $BACKUPDIR
|
cd $BACKUPDIR
|
||||||
@@ -17,7 +17,7 @@ gzip "backup-$NOW.sql"
|
|||||||
echo "Database Backup Complete on $NOW"
|
echo "Database Backup Complete on $NOW"
|
||||||
|
|
||||||
# Delete all but last 8 files
|
# Delete all but last 8 files
|
||||||
#ls -tp | grep -v '/$' | tail -n +9 | tr '\n' '\0' | xargs -0 rm -f --
|
ls -tp | grep -v '/$' | tail -n +9 | tr '\n' '\0' | xargs -0 rm -f --
|
||||||
|
|
||||||
##
|
##
|
||||||
# Restore DB
|
# Restore DB
|
||||||
|
|||||||
@@ -8,32 +8,15 @@ in pkgs.mkShell rec {
|
|||||||
buildInputs = [
|
buildInputs = [
|
||||||
# node for server
|
# node for server
|
||||||
nodejs
|
nodejs
|
||||||
nodePackages.npm
|
#nodePackages.npm
|
||||||
|
nodemon
|
||||||
|
pnpm
|
||||||
pm2
|
pm2
|
||||||
];
|
];
|
||||||
|
|
||||||
# Run this command, only after creating the virtual environment
|
|
||||||
postVenvCreation = ''
|
|
||||||
unset SOURCE_DATE_EPOCH
|
|
||||||
'';
|
|
||||||
|
|
||||||
postShellHook = ''
|
postShellHook = ''
|
||||||
|
echo("Welcome to solid scribe")
|
||||||
if [[ ! -f lockfile.running ]] ; then
|
alias npm=pnpm
|
||||||
echo "No Lock File, starting servers"
|
|
||||||
touch lockfile.running
|
|
||||||
|
|
||||||
# start service
|
|
||||||
# npm run start or whatever
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
# kill everything when main screen is closed
|
|
||||||
function end {
|
|
||||||
echo "Exiting, Removing Lockfile"
|
|
||||||
rm -f lockfile.running
|
|
||||||
}
|
|
||||||
trap end EXIT
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user