4x/iot-user-center-frontend/deploy/deploy.config.js

45 lines
1.8 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* @Date: 2024-07-11 15:49:10
* @LastEditors: chenweirong@four-faith.com
* @LastEditTime: 2024-07-12 17:23:22
*/
/*
* ------------------------------前端部署指南------------------------------:
* 确认本地安装好nodejs然后执行
* npm i fe-deploy-cli -g
* 安装完成后,初始化部署模板:
* deploy init
* 然后根据提示填写配置文件,最后执行自动部署命令:
* deploy dev // 部署测试环境
* deploy prod // 部署线上环境
*/
module.exports = {
privateKey: '', // 本地私钥地址位置一般在C:/Users/xxx/.ssh/id_rsa非必填有私钥则配置
passphrase: '', // 本地私钥密码,非必填,有私钥则配置
projectName: '用户中心', // 项目名称
// 根据需要进行配置如只需部署prod线上环境请删除dev测试环境配置反之亦然支持多环境部署
dev: { // 测试环境
name: '测试环境9.244',
script: 'npm run build:stage', // 测试环境打包脚本
host: '192.168.9.244', // 测试服务器地址
port: 22, // ssh port一般默认22
username: 'root', // 登录服务器用户名
password: 'FF_2024_Water', // 登录服务器密码
distPath: 'dist', // 本地打包dist目录
webDir: '/home/xmsx/www/user-center' // // 测试环境服务器地址
}
// prod: { // 线上环境,未经授权不允许直接部署到线上!!!
// name: '线上环境',
// script: 'npm run build:prod', // 线上环境打包脚本
// host: '', // 线上服务器地址
// port: , // ssh port一般默认22
// username: '', // 登录服务器用户名
// password: '', // 登录服务器密码
// distPath: 'dist', // 本地打包dist目录
// webDir: '' // 线上环境web目录
// }
// 再还有多余的环境按照这个格式写即可
}