I have problems setting permissions for a web folder on Elastic Beanstalk. I run several containers using custom docker images in a single instance: apache-php, mysql, memcached, etc. For the "apache-php" container, I map the folder to my yii2 application in / var / www / html /.
When I manually create a package and download / deploy through the Elastic Beanstalk console, I am sure that you have rights to this folder and everything works fine.
Now, when I deploy the application using "eb deploy", it removes all permissions, and I get a server error, and "the directory is not writable by the web process: / var / www / html / backend / web / assets" in the logs .
I can connect via ssh and set the necessary permissions manually, but this is not convenient, since it needs to be done every time the application is redeployed.
So, my questions are the best way to automatically select the resolution for a specific folder in a specific container on Elastic Beanstalk?
Maybe I can use .ebextensions, but I have not found how to run "container_commands" for a specific container.
source share