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 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南