我在 AWS 上使用 jenkins 进行持续部署。一切正常,但是当我查看我的页面时,出现以下错误:
Warning: require_once(/var/app/web/../app/bootstrap.php.cache): failed to open stream: No such file or directory in /var/app/web/app.php on line 6 Fatal error: require_once(): Failed opening required '/var/app/web/../app/bootstrap.php.cache' (include_path='.:/usr/local/lib/php') in /var/app/web/app.php on line 6
我知道,这是因为我错过了应该由composer生成的bootstrap.php.cache,但是什么都没有。
在 dockerfile 中,我使用 RUN composer install --no-scripts --optimize-autoloader
在入口点我有composer run-script post-install-cmd --no-interaction
最佳答案
执行以下命令:
sudo php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php
关于php - Symfony 缺少 bootstrap.php.cache,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35081480/