【问题标题】:Elastic Beanstalk and Symfony bin/console commandsElastic Beanstalk 和 Symfony bin/console 命令
【发布时间】:2018-12-24 19:17:55
【问题描述】:

我在部署后尝试运行命令doctrine:schema:update。于是我在.ebextensions下准备了这个文件

83_post_setup.config

 container_commands:
  01_update_symfony_db:
    command: php /var/app/current/bin/console doctrine:schema:update --force

但我不断收到以下错误:

ERROR: [Instance: i-0ffc989ebd7c41d79] Command failed on instance. Return code: 1 Output: Could not open input file: /var/app/current/bin/console. container_command 01_update_symfony_db in .ebextensions/83_post_setup.config failed. For more detail, check /var/log/eb-activity.log using console or EB CLI. INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1]

我也尝试用commands: 替换container_commands:,但后来我遇到了ENV 问题ENV RDS_USERNAME not found,因为运行此命令还为时过早。有人有解决方案吗?

【问题讨论】:

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


    【解决方案1】:

    只需去掉完整路径即可解决:

     01_update_symfony_db:
        command: php bin/console doctrine:schema:update --force
    

    【讨论】:

      猜你喜欢
      • 2018-09-03
      • 1970-01-01
      • 1970-01-01
      • 2019-04-03
      • 2018-05-25
      • 2015-09-15
      • 2020-12-13
      • 1970-01-01
      • 2020-10-08
      相关资源
      最近更新 更多