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

0

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

질문됨 2달 전101회 조회
1개 답변
0

Thank you for surfacing this issue with our docs. We have updated our docs https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/php-configuration-composerupdate.html to contain new sample commands for updating composer and setting the COMPOSER_HOME variable. Due to the changes related to composer introduced in the February 22, 2024, AL2023 platform release and the February 28, 2024, AL2 platform release, updating composer may fail if COMPOSER_HOME is set at the time of the self-update.

Pease try the following EB extension:

commands:
  01updateComposer:
    command: /usr/bin/composer.phar self-update 2.7.0

option_settings:
  - namespace: aws:elasticbeanstalk:application:environment
    option_name: COMPOSER_HOME
    value: /home/webapp/composer-home
답변함 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인