I hope you're all doing great. I have a question regarding connecting to an RDS MySQL database from a PHP YII application running on a Docker container.
I'm currently working on a project where I'm using Docker to containerize my YII application. I have also set up an RDS MySQL database on AWS to store my data. Now, I've heard that using environment variables is a good practice for storing sensitive information like database credentials, rather than hardcoding them into the code.
I wanted to know how I can set up and use environment variables in my PHP YII application to connect to the RDS MySQL database. Are there any specific steps or configurations I need to follow in order to achieve this?
I would really appreciate any insights or guidance on this matter. Feel free to ask for any further clarification or details. Thank you in advance for your help!