amazon-linux-2023 icon indicating copy to clipboard operation
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

Open jordanade opened this issue 11 months ago • 2 comments

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:

  1. Create PHP 8.2 running on 64bit Amazon Linux 2023/4.1.0 environment on Elastic Beanstalk
  2. eb deploy source bundle with composer.json

Expected behavior Success

jordanade avatar Mar 04 '24 10:03 jordanade