From a74126daebfcc1bc5602bb4244b9bb0a060b4af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 28 Dec 2023 03:26:07 -0500 Subject: [PATCH] refactor(ci): set bun env to production --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b3829f..f9b650a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,9 +47,9 @@ deploy_stage: # restart Node.js and reload nginx configuration - sshpass -p "${OLDROOTPWD}" ssh root@rockfic.com '~/cp.sh' - - ssh rockfic@${DEPLOY_SERVER} "mongosh mongodb://localhost <(echo -e \"use rockfic_old\ndb.dropDatabase()\nuse ${DB_NAME}\ndb.dropDatabase()\")" + - ssh rockfic@${DEPLOY_SERVER} "mongosh <(echo -e \"use rockfic_old\ndb.dropDatabase()\nuse ${DB_NAME}\ndb.dropDatabase()\")" - ssh rockfic@${DEPLOY_SERVER} 'mongorestore --drop -d rockfic_old dump/rockfic' - - ssh rockfic@${DEPLOY_SERVER} 'cd migrator && bun install && bun run ./index.ts' + - ssh rockfic@${DEPLOY_SERVER} 'cd migrator && bun install && NODE_ENV=production bun run ./index.ts' - ssh rockfic@${DEPLOY_SERVER} 'sed -Ei "s,(hasMigrated = )false,\1true," rockfic-staging/lib/dbconfig.ts' - ssh rockfic@${DEPLOY_SERVER} node "~/rockfic-staging/.output/server/index.mjs" \&\>/dev/null \& disown \%1 - ssh rockfic@${DEPLOY_SERVER} systemctl reload apache2