【发布时间】:2021-10-19 11:43:32
【问题描述】:
我已经使用 codedeploy 服务在 ec2 上部署了应用程序,但应用程序崩溃并显示以下错误消息:
Script at specified location: scripts/start_server failed to complete in 100 seconds
下面是我的 appspec.yml 文件:
version: 0.0
os: linux
files:
- source: /
destination: /tmp/
hooks:
AfterInstall:
- location: scripts/install_dependencies
timeout: 100
runas: root
ApplicationStart:
- location: scripts/start_server
timeout: 100
runas: root
install_dependencies
cd /tmp/
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install node
npm install
start_server
cd /tmp/
node server.js
有人告诉我我做错了什么。
【问题讨论】:
标签: amazon-web-services amazon-ec2 aws-code-deploy