我已经设置 circleCI、AWS CodeDeploy 和 EC2 一起工作,这样在我将代码推送到 git 后,它会中继到 circleCI,然后是 EC2,并在那里启动服务器。
一切正常,除了服务器运行正常并且 circleCI 不会给我一个成功的构建状态。它始终处于“运行”状态
应用规范.yml
version: 0.0
os: linux
files:
- source: /
destination: /home/ubuntu
permissions:
- object: /home/ubuntu/scripts
pattern: "**"
mode: 777
type:
- file
hooks:
ApplicationStart:
- location: scripts/start.sh
timeout: 3800
启动.sh
#!/bin/bash
node server.js
有谁知道如何解决这个问题?