# https://aws.amazon.com/codedeploy/faqs/
# https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file.html
version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/html
hooks:
  ApplicationStop:
    - location: CodeDeploy/stop-server.sh
      timeout: 300
      runas: root
# DownloadBundle: Not for Use.
  BeforeInstall:
    - location: CodeDeploy/folder-cleanup.sh
      timeout: 300
      runas: root      
# Install: Not for Use.
  AfterInstall:
    - location: CodeDeploy/after-install.sh
      timeout: 300
      runas: root
    - location: CodeDeploy/set-permissions.sh
      timeout: 300
      runas: root
  ApplicationStart:
    - location: CodeDeploy/start-server.sh
      timeout: 300
      runas: root
#  ValidateService: 
#    - location: CodeDeploy/validate-service.sh
#      timeout: 300
#      runas: root