PM2部署文件夹结构-如何使用/配置
PM2 deploy folder structure - how to use / configure
我正在使用 PM2
和 nvm
作为 described in the pm2 documentation 部署节点应用程序。我观察了生成的文件夹结构,我在问自己为什么会这样,以及是否有某种方法可以配置它。
我的 ecosystem.config.js
只包含连接到 git (bitbucket) 和检查项目的最少信息,这就是为什么我认为不值得把它放在这里。
这是我得到的文件夹结构 运行 pm2 deploy production setup
:
source/
.git // git root
*.* // all checked out projet files
shared/
pids/ // empty folder, pids are in ~/.pm2/pids
logs/ // empty folder, logs are in ~/.pm2/logs
current/ // symlink to /source
.deploys // git commit ids
我的问题是:
/current
有什么用?直接导航到 /source
将给出相同的结果。在 capistrano 部署中,我检查了几个版本,有一个符号链接很有意义,因为它允许立即回滚,但在这里我看不出它有什么用。
- 如果我只在 webroot 中保留
/source
的子文件夹怎么办?有没有办法配置这个?可能我还是想太多了'Apache mode',没这个必要吧?
这个 github 问题很好地描述了我的问题(和其他问题);
https://github.com/Unitech/pm2-deploy/issues/27#issue-49186558
我的问题的答案比我希望的更简单:
current/
文件夹的符号链接没有达到目的。
- 无法更详细地配置
pm2 deploy
。
我正在使用 PM2
和 nvm
作为 described in the pm2 documentation 部署节点应用程序。我观察了生成的文件夹结构,我在问自己为什么会这样,以及是否有某种方法可以配置它。
我的 ecosystem.config.js
只包含连接到 git (bitbucket) 和检查项目的最少信息,这就是为什么我认为不值得把它放在这里。
这是我得到的文件夹结构 运行 pm2 deploy production setup
:
source/
.git // git root
*.* // all checked out projet files
shared/
pids/ // empty folder, pids are in ~/.pm2/pids
logs/ // empty folder, logs are in ~/.pm2/logs
current/ // symlink to /source
.deploys // git commit ids
我的问题是:
/current
有什么用?直接导航到/source
将给出相同的结果。在 capistrano 部署中,我检查了几个版本,有一个符号链接很有意义,因为它允许立即回滚,但在这里我看不出它有什么用。- 如果我只在 webroot 中保留
/source
的子文件夹怎么办?有没有办法配置这个?可能我还是想太多了'Apache mode',没这个必要吧?
这个 github 问题很好地描述了我的问题(和其他问题); https://github.com/Unitech/pm2-deploy/issues/27#issue-49186558
我的问题的答案比我希望的更简单:
current/
文件夹的符号链接没有达到目的。- 无法更详细地配置
pm2 deploy
。