简体   繁体   English

使用AWS OpsWorks,如何启动节点应用程序?

[英]Using AWS OpsWorks, how do I start my node application?

I've created a simple stack in AWS OpsWorks consisting of a Node app server Layer and an Elastic Load Balancer -- I'm trying to get my application to kick off on the deploy life cycle event. 我已经在AWS OpsWorks中创建了一个简单的堆栈,该堆栈由Node应用程序服务器层和Elastic Load Balancer组成-我试图让我的应用程序在部署生命周期事件中启动。 In other words, at some point I need the server to run node start 换句话说,在某个时候我需要服务器运行node start

I have the built-in Chef recipes, summarized by life-cycle event below: 我有内置的Chef食谱,下面按生命周期事件进行了概述:

Setup : opsworks_nodejs 设置 :opsworks_nodejs

Configure : opsworks_nodejs::configure 配置 :opsworks_nodejs :: configure

Deploy : opsworks_nodejs, deploy::nodejs 部署 :opsworks_nodejs,部署:: nodejs

But when I SSH into my instance and check for running node processes, nothing comes up. 但是,当我通过SSH进入实例并检查正在运行的节点进程时,什么都没有发生。 I'm diving into the individual recipes now, but would appreciate any help or guidance on this task. 我现在将深入探讨各个食谱,但是希望您对此任务有任何帮助或指导。

If you're running with default OpsWorks Chef recipes, you must make sure that your main app file is named server.js and it's listening on ports 80 or 443. 如果使用默认的OpsWorks Chef配方运行,则必须确保主应用程序文件名为server.js ,并且正在侦听端口80或443。

See here for additional information - http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-node.html 有关其他信息,请参见此处-http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-node.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM