amazonlinux / amazon-linux-2023

Amazon Linux 2023
https://aws.amazon.com/linux/amazon-linux-2023/
Other
500 stars 38 forks source link

[Bug] - Composer home directory (i.e. /home/webapp/composer-home) on Elastic Beanstalk is not writable, breaks composer update and eb deploy #644

Open jordanade opened 4 months ago

jordanade commented 4 months ago

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

bhfish2020 commented 1 week ago

was this ever figured out?

jordanade commented 1 week ago

was this ever figured out?

Yes, it started working at some point, but one thing I did which may have helped is to stop attempting to set the COMPOSER_HOME env var at all.