Commit c88ac383 by lijiabin

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

parent f048b3ec
......@@ -24,10 +24,10 @@ const zipPath = path.resolve(__dirname, 'dist.tar.gz')
const { spawn, servicePath, serviceFilePath, unzipDir } = unzipDirMode
// 服务器连接信息
const connectInfo = {
host: '', // 服务器地址
port: '22',
username: 'root',
password: '', // 服务器密码
host: process.env.DEPLOY_PROD_HOST, // 服务器地址
port: process.env.DEPLOY_PROD_PORT,
username: process.env.DEPLOY_PROD_USERNAME,
password: process.env.DEPLOY_PROD_PASSWORD, // 服务器密码
}
//链接服务器
let conn = new ssh.Client()
......
......@@ -18,8 +18,8 @@
"build:test": "nvm use 20 && vite build --mode test",
"deploy:test": "node deploy/deploytest.js",
"build:prod": "nvm use 20 && vite build --mode production",
"deploy:prod": "node deploy/deployprod.js",
"deploy:prod:update-info": "node deploy/deployprod.js --update-info"
"deploy:prod": "node --env-file=.env.local deploy/deployprod.js",
"deploy:prod:update-info": "node --env-file=.env.local deploy/deployprod.js --update-info"
},
"dependencies": {
"@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