-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Allen Zhang
committed
Sep 11, 2023
1 parent
a275756
commit 81312c8
Showing
10 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#-----------------------Backend Config------------------------------# | ||
# Prisma Config | ||
DATABASE_URL=postgresql://root:[email protected]:5432/canyon | ||
#mongodb url | ||
MONGODB_URL=mongodb://t_flttsworkstruct:HW3cp57rCtgk9DKUmFEz@flttsworkstruct01.mongo.db.fat.qa.nt.ctripcorp.com:55111/flttsworkstructdb | ||
# Gitlab Auth Config | ||
GITLAB_URL="http://git.dev.sh.ctripcorp.com" | ||
GITLAB_TOKEN="6bb2887ea5bc21df691ab73f877b056593a798471f1a161e9b2682ed885dc84f" | ||
GITLAB_CLIENT_ID="7fa15c07f39bf9a394e61a7fec497d2ff4b51545bcc84272fbbc7bac82dc4999" | ||
GITLAB_CLIENT_SECRET="ed033561bb04e587fbcf738d38efa3e088e41ab07fd814787669d4f38ff062bb" | ||
|
||
# Backend URLs | ||
VITE_BACKEND_API_URL=http://10.5.153.1:3170 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,4 @@ dist-ssr | |
|
||
pnpm-lock.yaml | ||
|
||
.env | ||
#.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const path = require('path') | ||
const packageConfig = require(path.resolve(__dirname, './package.json')) | ||
|
||
module.exports = { | ||
AppID: packageConfig.AppID, | ||
Env: 'fws', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,6 @@ | |
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC" | ||
} | ||
"license": "ISC", | ||
"AppId": "100034535" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
node "%~dp0..\node_modules\@ctrip\node-vampire-heapdump\scripts\dumpApp.js" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
scriptsDir=$(dirname $BASH_SOURCE) | ||
node ${scriptsDir%%/}/"../node_modules/@ctrip/node-vampire-heapdump/scripts/dumpApp.js" $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
scriptsDir=$(dirname $BASH_SOURCE) | ||
cat ${scriptsDir%%/}/"../node_modules/@ctrip/node-vampire-heapdump/.state.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pm2 delete all | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
appid=${PAAS_APP_APPID:-100034535} | ||
appname=nodeapp-$appid | ||
|
||
|
||
# 不同的环境因为机器配置不一样,使用不同的实例数 | ||
case "$env" in | ||
"FWS"|"FAT"|"LPT") | ||
instance=1 | ||
;; | ||
"UAT") | ||
instance=5 | ||
;; | ||
*) | ||
instance=10 | ||
;; | ||
esac | ||
|
||
pm2 delete all | ||
|
||
if [ -d /opt/nodeapp ]; then | ||
# docker | ||
cd /opt/nodeapp | ||
else | ||
# vm | ||
cd "$(dirname $BASH_SOURCE)/../current/" | ||
fi | ||
|
||
|
||
NODE_ENV=production pm2 start packages/app-backend/dist/main.js \ | ||
-i $instance \ | ||
--name $appname \ | ||
--merge-logs \ | ||
--log-date-format "YYYY-MM-DD HH:mm:ss.SSS" \ | ||
--log "/opt/logs/$appid/outerr.log" \ | ||
--output "/opt/logs/$appid/out.log" \ | ||
--error "/opt/logs/$appid/err.log" | ||
exit 0 |