我正在尝试使用经典的azure管道为nextjs项目构建发布管道,以将其部署在自托管Windows服务器上,并且我使用iis作为nextjs应用程序的重定向服务器,我的问题是如何保持nextjs应用程序运行以启用重定向从 iis 到它?
我使用过的任务
steps:
- task: NodeTool@0
displayName: 'Use Node 20.x'
inputs:
versionSpec: 20.x
steps:
- powershell: |
npm i
workingDirectory: 'some directory'
displayName: 'npm i'
steps:
- powershell: |
npm install pm2 -g
workingDirectory: 'some directory'
displayName: 'npm install pm2 -g'
steps:
- powershell: 'pm2-runtime start ecosystem.config.js --env production'
workingDirectory: 'some directory'
displayName: 'pm2-runtime start ecosystem.config.js --env production'
env:
HOME: ~