services.printer/config/deploy.config.example.cjs
liufumingren c5bd7138e8 feat: 添加蓝绿部署发布脚本系统
- 蓝绿部署 (v1/v2 双实例, 端口 4051/4052)

- 部署预检、远程部署、回滚

- 版本追踪、Git 安全 Hook

- Nginx upstream 自动切换
2026-07-25 01:31:13 +08:00

27 lines
688 B
JavaScript

# services.printer 部署配置示例
# 复制此文件为 deploy.config.local.cjs 并填入真实值
module.exports = {
production: {
host: '__FILL_SSH_HOST__',
port: 22,
username: '__FILL_SSH_USERNAME__',
privateKeyPath: 'C:/Users/your-user/.ssh/id_rsa',
deployRoot: '/www/wwwroot/services.printer',
sharedDirs: [ 'logs', 'run', 'tmp' ],
keepBackups: 5,
preDeployCommands: [
'node -v',
'npm -v',
],
postDeployCommands: [
'npm install --production',
'npm run stop || true',
'npm start',
],
healthCheckUrl: 'http://127.0.0.1:4051/',
sshOptions: [
'StrictHostKeyChecking=accept-new',
],
},
};