# Thanks to: http://sfviapgh.com/blog/2016/2/18/how-to-deploy-rails-with-aws-codedeploy
version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/autism-funding.com/html
permissions:
  - object: /var/www/autism-funding.com/html
    owner: ubuntu
    group: www-data
    mode: 640
    type:
      - file
  - object: /var/www/autism-funding.com/html
    owner: ubuntu
    group: www-data
    mode: 750
    type:
      - directory
  - object: /var/www/autism-funding.com/html/log
    owner: ubuntu
    group: www-data
    mode: 770
    type:
      - directory
  - object: /var/www/autism-funding.com/html/bin
    owner: ubuntu
    group: www-data
    mode: 750
    type:
      - file
hooks:
  ApplicationStop:
    - location: scripts/ApplicationStop.sh
      runas: root
  AfterInstall:
    - location: scripts/AfterInstall.sh
      runas: root
  ApplicationStart:
    - location: scripts/ApplicationStart.sh
      runas: root

# Thanks to: http://sfviapgh.com/blog/2016/2/18/how-to-deploy-rails-with-aws-codedeploy
version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/autism-funding.com/html
permissions:
  - object: /var/www/autism-funding.com/html
    except: [ /var/www/autism-funding.com/html/bin/ ]
    owner: ubuntu
    group: www-data
    mode: 640
    type:
      - file
  - object: /var/www/autism-funding.com/html
    except: [ /var/www/autism-funding.com/html/log ]
    owner: ubuntu
    group: www-data
    mode: 750
    type:
      - directory
  - object: /var/www/autism-funding.com/html/log
    owner: ubuntu
    group: www-data
    mode: 770
    type:
      - directory
  - object: /var/www/autism-funding.com/html/bin
    owner: ubuntu
    group: www-data
    mode: 750
    type:
      - file
hooks:
  ApplicationStop:
    - location: scripts/ApplicationStop.sh
      runas: root
  AfterInstall:
    - location: scripts/AfterInstall.sh
      runas: root
  ApplicationStart:
    - location: scripts/ApplicationStart.sh
      runas: root

Exclude bin files from global permissions.
Exclude bin files from global permissions.
