Commit c88ac383 by lijiabin

【需求 20520】 feat: 服务器相关配置改为从环境变量读取

parent f048b3ec
...@@ -24,10 +24,10 @@ const zipPath = path.resolve(__dirname, 'dist.tar.gz') ...@@ -24,10 +24,10 @@ const zipPath = path.resolve(__dirname, 'dist.tar.gz')
const { spawn, servicePath, serviceFilePath, unzipDir } = unzipDirMode const { spawn, servicePath, serviceFilePath, unzipDir } = unzipDirMode
// 服务器连接信息 // 服务器连接信息
const connectInfo = { const connectInfo = {
host: '', // 服务器地址 host: process.env.DEPLOY_PROD_HOST, // 服务器地址
port: '22', port: process.env.DEPLOY_PROD_PORT,
username: 'root', username: process.env.DEPLOY_PROD_USERNAME,
password: '', // 服务器密码 password: process.env.DEPLOY_PROD_PASSWORD, // 服务器密码
} }
//链接服务器 //链接服务器
let conn = new ssh.Client() let conn = new ssh.Client()
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
"build:test": "nvm use 20 && vite build --mode test", "build:test": "nvm use 20 && vite build --mode test",
"deploy:test": "node deploy/deploytest.js", "deploy:test": "node deploy/deploytest.js",
"build:prod": "nvm use 20 && vite build --mode production", "build:prod": "nvm use 20 && vite build --mode production",
"deploy:prod": "node deploy/deployprod.js", "deploy:prod": "node --env-file=.env.local deploy/deployprod.js",
"deploy:prod:update-info": "node deploy/deployprod.js --update-info" "deploy:prod:update-info": "node --env-file=.env.local deploy/deployprod.js --update-info"
}, },
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^2.3.2", "@element-plus/icons-vue": "^2.3.2",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment