问题描述
正如标题所说,我已经被玩弄部署与亚马逊新OpsWorks管理系统的应用程序,但我一直无法弄清楚如何获得节点服务器启动的实例上运行。从应用层的访问端口嫌我想我需要被侦听端口80,但是我觉得这个问题是不是正在启动正确的文件。
As the title suggested, I've been playing around deploying apps with Amazons new OpsWorks management system, however I haven't been able to figure out how to get the node server to start running on the instance. From the ports the application layers have access too I assume I need be listening on port 80, however I feel that the problem is that the correct file isn't being started.
类似于Procfile在Heroku上,有没有需要包括对OpsWorks正常启动它一个特殊的启动脚本类型的文件?
Similar to a Procfile on Heroku, is there a special start-script type file that needs to be included for OpsWorks to start it properly?
请注意,我没有与厨师的经验呢,所以我希望得到它使用默认选项工作,即不是书面方式自定义厨师的配方来做到这一点。
Note that I don't have experience with Chef yet, so I'm hoping to get it working with the default options, ie not writting a custom Chef recipe to do it.
推荐答案
的时候,我花了这个量很尴尬,但我会在拯救他人生命的时间,否则将被偷走的希望反正分享亚马逊。
The amount of time I spent on this is embarrassing, but I will share anyway in hopes of saving other people the hours of their lives that would otherwise be stolen by Amazon.
- 要回答你的问题,是的,我没有得到我的节点/ EX preSS应用程序的运行。
- 在情况下,你使用任何一种选择你的端口号
process.env
方法,你的监听端口更改为80(或443如适用)。李> - 最重要的是,亚马逊并不关心你的
主
文件是什么。其重命名为server.js
,并让它在你的应用程序的根目录下。这是monit的尝试运行该文件。
- To answer your question, yes, I did get my node/express application running.
- In case you were using any kind of
process.env
method of choosing your port number, change your listening port to 80 (or 443 if appropriate). - Most importantly, Amazon doesn't care what your
main
file is. Rename itserver.js
and have it in the root directory of your application. That is the file that monit tries to run.
希望这有助于。如果没有,或者如果这一切是显而易见的,我为我的愚蠢道歉,并指责睡眠不足。 :)
Hopefully that helps. If it doesn't, or if all of that is obvious, I apologize for my silliness and blame lack of sleep. :)
这篇关于任何人都已经成功部署的节点(如preSS)与Amazon OpsWorks应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!