7. Create appspec.yml for CodeDeploy

Create appspec.yml file in git repository root and push it.

circle-info

The filename should be "appspec.yml", unless performing local deployment.

https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file.htmlarrow-up-right

version: 0.0
os: linux

files:
  - source: /
    destination: /home/ec2-user/build/
permissions:
  - object: /
    pattern: "**"
    owner: ec2-user
    group: ec2-user
hooks:
  AfterInstall:
    - location: scripts/startup.sh
      timeout: 60
      runas: ec2-user

The version 0.0 seemed odd to me but it's correct.

scripts/startup.sh script file will be created in the next step.

Last updated