amazon-linux-2023
amazon-linux-2023 copied to clipboard
[Bug] - Composer home directory (i.e. /home/webapp/composer-home) on Elastic Beanstalk is not writable, breaks composer update and eb deploy
Describe the bug
On deployment, I get lots of errors like this: Cannot create cache directory /home/webapp/composer-home/cache/files/, or directory is not writable. Proceeding without cache. See also cache-read-only config if your filesystem is read-only.
This leads to a failed deployment: Instance deployment failed to install Composer dependencies specified in 'composer.json' in your source bundle. The deployment failed.
This can be worked around but seems like a bug, given that composer installation is supposed to be handled automatically on the EB PHP platform. It also means these instructions don't work: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/php-configuration-composerupdate.html
To Reproduce Steps to reproduce the behavior:
- Create
PHP 8.2 running on 64bit Amazon Linux 2023/4.1.0
environment on Elastic Beanstalk -
eb deploy
source bundle withcomposer.json
Expected behavior Success