[英]Laravel .env in AWS Elastic Beanstalk
I have deployed my Laravel application to AWS Beanstalk .我已将我的 Laravel 应用程序部署到AWS Beanstalk 。 I also connected CodePipeline for automatic deployment.我还连接了CodePipeline以进行自动部署。 As I have multiple environments (staging, testing, production) I want to use AWS Elastic Beanstalk environment variables for different environments.由于我有多个环境(暂存、测试、生产),我想将 AWS Elastic Beanstalk 环境变量用于不同的环境。 However, when I write my own variables to elastic beanstalk configuration and I dd(config('app.env'))
, it prints "production" instead of "staging" .但是,当我将自己的变量写入弹性 beantalk 配置并dd(config('app.env'))
,它会打印"production"而不是"staging" 。 How can I fix this problem?我该如何解决这个问题? Thanks in advance!提前致谢!
Ps: I also removed the .env file manually, it still did not work. Ps:我也手动删除了 .env 文件,还是不行。
亚马逊首先检查它的全局变量(google it pls)然后引用laravel .env 文件变量
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.