CodeDeploy - appspec file location basics

0

Morning. We have several repo's in github (some in codecommit) and looking to automate. So my first test is just updating code, and then manually deploying, then moving to auto-deploy (I assume using codepipeline).

I fixed some issues (so this is updated), but the basic question is, does the start/stop scripts have to be in the repo? When I tried to reference them under /root (on the EC2) the deploy failed. So, I don't want the real website to have the scripts folder, so I am wondering how others do it.

So what is easy way to say publish all files to destination X but do not put the scripts folder there? I would imagine I could add a cleanup to the last part, but would seem redundant vs saying ignore .sh, or scripts/ etc.

Here is the basic appspec I am starting with.

version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/html/
hooks:
  ApplicationStop:
    - location: scripts/stop_httpd.sh
      timeout: 15
      runas: root
  ApplicationStart:
    - location: scripts/start_httpd.sh
      timeout: 15
      runas: root
已提问 2 年前123 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则