title: Laravel - configuration cache on elastic beanstalk
body: <p>I have a Laravel application running on an Elastic Beanstalk environment. 
  Not having access to the database, S3 and SQS variables I did write a config on ebxtensions to copy some environment variables on the .env file during the deploy using the <code>echo</code> On a .sh hook file on post-deploy like this:</p>
  
  <pre><code>echo -e "AWS_BUCKET=$AWS_BUCKET" &gt;&gt; /var/app/current/.env
  </code></pre>
  
  <p>The .env file is correctly updated however another .sh hook that runs after that is completed that has the code:</p>
  
  <pre><code>php /var/app/current/artisan config:cache
  </code></pre>
  
  <p>And this saves the cached config file as the .env file was not updated yet.</p>
  
  <p>Right now the config:cache command needs to be run manually after the deploy but I really want to make the process all automatic.</p>
  
  <p>Any ideas why that happen?</p>