【发布时间】:2014-10-23 00:50:21
【问题描述】:
我正在尝试在 elasticbeanstalk 上部署一个 node.js 应用程序(我在这里遵循http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html 的指示),需要完成以下操作:
第 6 步 [使用数据库更新应用程序] 第 5 点。在本地计算机上,更新 node-express/.ebextensions/static.config 以将生产标志添加到环境变量。
option_settings:
- namespace: aws:elasticbeanstalk:container:nodejs:staticfiles
option_name: /public
value: /public
- option_name: NODE_ENV
value: production
但是当我部署时,我得到了错误:
2014-08-29 10:15:11 ERROR The configuration file .ebextensions/static.config in application version git-5376bdbd807e9f181e6a907f996068b4075dffe0-1409278503377 contains invalid YAML or JSON. YAML exception: while parsing a block mapping
in "<reader>", line 1, column 1:
option_settings:
^
expected <block end>, but found BlockEntry
in "<reader>", line 5, column 1:
- option_name: NODE_ENV
^
, JSON exception: Unexpected character (o) at position 0.. Update the configuration file.
我是新手,无法弄清楚如何纠正它。请帮忙。
【问题讨论】:
标签: json node.js amazon-web-services yaml amazon-elastic-beanstalk