Suggestions on using different .env files for different environments?
exzachlyvv opened this issue · 3 comments
exzachlyvv commented
I'm wondering if there are any suggestions on using a different .env file for each environment?
If no best practices, I plan on using https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions-functions.html#ebextensions-functions-ref
exzachlyvv commented
For future reference:
files:
"/tmp/.env":
mode: "000777"
owner: root
group: root
authentication: "S3Auth"
# download the ".env.{environment name in the eb console}"
source: 'https://elasticbeanstalk-eu-central-1-xxxxxxxxxxxx.s3.eu-central-1.amazonaws.com/.env.`{"Ref": "AWSEBEnvironmentName" }`'
worked well for me.
hientt53 commented
excellent, let me try. I have same problem.