Installing wordpress / mysql / nginx inside docker - AWS ec2 free instance

I was able to install wordpress / mysql and nginx using docker in AWS EC2 instance. but had the predefined settings value for the username, password and the configuration of wp-config.php details file I want to have those details configured automatically and dynamically. How do i do it… I used the version link below

Please guide

Regards,
Vijey

By reading the description for wordpress in Docker Hub, which points to an example on how to set values in the wp-config.php by setting the WORDPRESS_CONFIG_EXTRA environment variable. Then you set the environment variables you want to let the entrypoint script render the configuration you want.

Though, the environment variables are not specific to AWS EC2. I am not sure though, if the free tier EC2 instances have enough ressources to run Wordpress and Mysql on the same instance with decent performance or at all.

Hi thanks for the guidance,I will check the example and get back to you once I try.

Regarding the free tire EC2 - I checked and I was able to install wordpress and mysql in the same instance but I have not tried with docker, need to check. I want to get an idea how it has to be done and then implement the same in the paid version…

Regards,
Vijey