当前位置: 动力学知识库 > 问答 > 编程问答 >

amazon web services - Lumen on AWS Elastic Beanstalk - .env

问题描述:

I'm trying to deploy a Lumen app in Elastic Beanstalk.

The problem is around the .env file, of course it's gitignored, so how can I put that file into the server?

I tried to manually create the file after deploying, but the next deploy the file disappear and I have to manually recreate that file again. I don't think this is a solution....

What's the correct the way?

I tried with this solution but looks like the env variable are not being created after the deploy, so, is the only way to add directly to the AWS console?

Update

I manually added env variables through the AWS console, those variables are being displayed if I "echo" them (eg. echo $APP_ENV gives me the correct value production) but still those env variables are not being loaded in the Lumen app and ignored. Any thoughts?

网友答案:

Updating vlucas/phpdotenv from 1.0 to 2.2 solved the issue.

分享给朋友:
您可能感兴趣的文章:
随机阅读: