我正在尝试在AWS EB上安装symfony应用。我需要在部署期间启动bin / console,但我失败了。
这是ma .config文件。
commands:
10updateComposer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update 1.3.2
20updateDB:
command: php bin/console d:s:u -f
leader_only: true
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: COMPOSER_HOME
value: /root
- namespace: aws:elasticbeanstalk:container:php:phpini
option_name: document_root
value: /web
- namespace: aws:elasticbeanstalk:container:php:phpini
option_name: composer_options
value: --optimize-autoloader
我的命令20updateDB
不起作用我的命令不会从app目录启动,而是从/
这里的回复
Command failed on instance. Return code: 1 Output: Could not open input file: bin/console.
您是否知道在部署过程中应用程序的存储位置?
答案 0 :(得分:0)
事实上,您不应该使用commands
,而是container_commands
,但是在容器内部运行,因此bin/console
可以访问container_commands
。
此外,环境变量仅在count
。