0

I'm trying to to deploy my laravel app to AWS Elastic Beanstalk using git push. I can successfully deploy laravel app, but my problem is that I had some configuration in my composer.json

I created a config file in .ebextensions

commands:
   01updateComposer:
      command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update

option_settings:
   - namespace: aws:elasticbeanstalk:application:environment
     option_name: COMPOSER_HOME
     value: /root

How can I configure it to run my own composer.json which I had configured myself in the root of my laravel file.

The configuration above didn't run my composer.json

Thank you.

4
  • What do you see in the environment log? Have you tried to execute the command on the instance itself? Commented Jan 8, 2014 at 7:14
  • environment log everything success. Im actually adding autoload file in my composer.json. So I'm actually getting class not found when i access the domain. Commented Jan 8, 2014 at 7:26
  • So in the log you see the command being executed, yet you don't see the expected results? Commented Jan 8, 2014 at 7:32
  • "Im actually adding autoload file in my composer.json" — Not clear what this means. Can you explain? If you're getting "class not found" when you access the domain, it sounds like Composer might be working, but maybe not. Commented Jan 8, 2014 at 7:52

1 Answer 1

1

I found the solution by referring to this

AWS Elastic Beanstalk and Composer

replace my command in config with this

container_commands:
  01-install-composer:
    command: "curl -sS https://getcomposer.org/installer | php"
  02-install-packages:
    command: "php composer.phar install"
    cwd: "/var/app/ondeck"

the previous one is success, but my class isn't added to autoload

with the new command, it actually run my own composer.json file and added my class into the autoload file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.