我有一个使用 Yeoman 生成器开发的 NodeJS 应用程序,我正在尝试将其部署到 Elastic Beanstalk 实例。我对这个堆栈相当陌生,所以如果问题看起来很分散,我很抱歉。我能够使用此过程部署我的应用程序:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html 。然而,当我点击主页时,我只有一个空白的 Node 应用程序。我猜这是因为部署直接来 self 的 Git 存储库,并且我的 Grunt 构建过程尚未运行。有没有办法告诉 Elastic Beanstalk 在收到可部署后运行 Grunt 构建?
最佳答案
您需要将 Grunt 设置为在 AWS 上使用部署 Hook 运行。这是通过 container commands 完成的.
查看这个答案:How to automatically restart delayed_job when deploying a rails project on Amazon Elastic Beanstalk?
以及此相关博客文章:http://junkheap.net/blog/2013/05/20/elastic-beanstalk-post-deployment-scripts/
关于node.js - 将 yeoman node.js 应用程序部署到 Elastic Beanstalk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20289405/