AWS Elastic Beanstalk Composer无法选择composer.json

时间:2015-12-06 23:08:37

标签: amazon-web-services composer-php elastic-beanstalk amazon-elastic-beanstalk

我在使用Elastic Beanstalk尝试部署我的PHP应用程序时遇到问题。

enter image description here

我在.ebextensions中有.config,如下所示

commands:
    01-composer-selfupdate:
        command: "export COMPOSER_HOME=/root && composer.phar self-update -n"
    02-composer-install:
        command: "composer.phar install --no-dev --optimize-autoloader --prefer-dist --no-interaction"
option_settings:
    -   option_name: DB_SERVER
        value: '<server details>'
    -   option_name: DB_USER
        value: '<username>'
    -   option_name: DB_PASSWORD
        value: '<password>'
    -   option_name: DB_NAME
        value: '<db name>'
    -   namespace: aws:elasticbeanstalk:application:environment
        option_name: COMPOSER_HOME
        value: /root

这里是将composer放在根文件夹中的代码结构。 enter image description here

对此的任何帮助都非常感谢。

1 个答案:

答案 0 :(得分:1)

enter image description here

从日志中挑选找到合适的文件夹:

+ EB_APP_STAGING_DIR=/var/app/ondeck
  ++ /opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir
  + EB_APP_DEPLOY_DIR=/var/app/current
  + '[' -d /var/app/current ']'
  + mv /var/app/current /var/app/current.old
  + mv /var/app/ondeck /var/app/current
  + nohup rm -rf /var/app/current.old