title: appspec.yml for reactjs app on aws
body: <p>I am deploying my nodejs react application on aws and I am using EC2 and CodeDeploy. I am almost there but my deployment is getting failed because there is no appspec.yml file in the project. I have created an appspec.yml file in my project and took a boilerplate code from github for it</p>
  
  <p>It looks like this right now</p>
  
  <p>appspec.yml</p>
  
  <pre><code>version: 0.0
  os: linux
  files:
     - source: /
       destination: /var/www/html
  permissions:
     - object: /var/www/html
       pattern: "**"
       owner: apache
       group: apache
       mode: 755
       type:
         - file
  hooks:
     BeforeInstall:
      - location: scripts/installapache.sh
        runas: root
      - location: scripts/startapache.sh
        runas: root
     AfterInstall:
      - location: scripts/restartapache.sh
        runas: root
  </code></pre>
  
  <p>This is a boiler plate code. But for my applciation I need to run these commands </p>
  
  <pre><code>npm install -g yarn
  yarn install --ignore-scripts
  gulp 
  </code></pre>
  
  <p>How should I include these in an appspec.yml file? Can someone show how should it look?</p>
  
  <p>Also do it need to change permissions fields (in appspec.yml) depending on the project structure?</p>