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
gefragt vor 2 Jahren123 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen