Using environment variables or .env file in Dockerrun.aws.json for AWS Elastic Beanstalk

Viewed 706

Im trying to deploy this application on an AWS ECS server using Elastic Beanstalk (EB). I'm loosely following this medium article.

The project is using several environment variables in the docker compose file which are essential for the application. However EB requires Dockerrun.aws.json (equivalent of docker-compose.yml) and one way to add environment variables to Dockerrun json is mentioned here, but I will be passing some credentials to through the environment variables hence exposing those values in the json file will be a security risk.

I have went through the documentation and there wasn't any such feature which allowed the use of environment variable / .env file. Is there a way to add it to the dockerrun file? If not then is there any workaround for using environment variables?

0 Answers
Related