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.
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.
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.
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.
0 commentaires:
Enregistrer un commentaire