Reputation: 31
I am trying to upload my laravel project to AWS using elastic beanstalk. However, every time I upload the project (using the UI button "upload and deploy") I get the following error during deployment:
[Instance: i-064b98ad84a27d750] Command failed on instance. Return code: 1 Output: chmod: cannot access ‘/var/app/current/storage’: No such file or directory. Hook /opt/elasticbeanstalk/hooks/appdeploy/post/99_make_storage_writable.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
My .ebextensions file (named: "04postdeploy.config") looks like this:
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/99_make_storage_writable.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
chmod -R 777 /var/app/current/storage
Can someone please point me out what I am doing wrong?
Thanks in advance!
Upvotes: 0
Views: 2536
Reputation: 51
I try to answer, even if it's been a while, but maybe need someone else. The same problem happened to me, on an environment already in production on AWS. In my case the error was in the zip file that I was loading, instead of creating it inside the folder, it created me a higher directory.
Upvotes: 2
Reputation: 1
After running eb logs, I found, by following the order of the downloads, that i got an error while i was downloading the requirement pkg-resources==0.0.0. I found here that adding this requirement to the requirements.txt is a bug in Ubuntu, after I removed this line from my requirements.txt file, I was able to successfully deploy my application.
Upvotes: 0