From 44f19f71b38396b2b79acb8d21d35a9b2621dbd7 Mon Sep 17 00:00:00 2001 From: sheninthjr Date: Mon, 6 Nov 2023 22:52:52 +0530 Subject: [PATCH] Home deploy --- deploy.sh | 7 +++++++ packages/prisma/package.json | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 deploy.sh diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..4030f55 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,7 @@ + +export PATH=$PATH:/home/ubuntu/.nvm/versions/node/v21.1.0/bin + +cd /home/ubuntu/Automatic-Question-Generator + git pull origin master + cd packages/prisma + yarn start:express diff --git a/packages/prisma/package.json b/packages/prisma/package.json index dcbe1aa..1be1953 100644 --- a/packages/prisma/package.json +++ b/packages/prisma/package.json @@ -14,8 +14,8 @@ "prisma:deploy": "prisma migrate deploy", "build": "esbuild ./server/index.js --bundle --platform=node --outfile=dist/index.js", "dev": "tsc -b && node dist/index.js", - "all":"yarn prisma migrate dev && yarn prisma generate && sudo docker-compose up -d && tsc -b && node dist/index.js", - "start": "node dist/index.js", + "all": "yarn prisma migrate dev && yarn prisma generate && sudo docker-compose up -d && tsc -b && node dist/index.js", + "start:express": "sudo docker-compose up -d && yarn prisma migrate dev && yarn prisma generate && pm2 kill && yarn install && yarn build && pm2 start node dist/index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": {