Javid Abbasov
Javid Abbasov

Reputation: 214

Laravel .env in AWS Elastic Beanstalk

I have deployed my Laravel application to AWS Beanstalk. I also connected CodePipeline for automatic deployment. As I have multiple environments (staging, testing, production) I want to use AWS Elastic Beanstalk environment variables for different environments. However, when I write my own variables to elastic beanstalk configuration and I dd(config('app.env')), it prints "production" instead of "staging". How can I fix this problem? Thanks in advance!

P.s: I also removed the .env file manually, it still did not work.

env

Upvotes: 4

Views: 1650

Answers (1)

Vagif Aghayev
Vagif Aghayev

Reputation: 421

Amazon first check it's global variables (google it pls) and then refers to laravel .env file variables

Upvotes: 1

Related Questions