我在使用Elastic Beanstalk尝试部署我的PHP应用程序时遇到问题。
我在.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
对此的任何帮助都非常感谢。
答案 0 :(得分:1)
从日志中挑选找到合适的文件夹:
+ 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