I have setup magento2 in docker container build using the docker file. Now I want to automate the database setup process so looking for the config file where I can set the database configuration like database name,username and password.
Reading few blog post says it is available at /app/etc/env.php
but I cannot find the env.php file inside these location under my magento2 setup directory.
Those who are docker container for magento2, how do you automate the magento setup process (setting up database & Creating admin account) after magento2 installation.
Why is the env.php missing or does it comes only after initial database set up is done once.
2
Answers
The env.php file generate by magento on installation.
You can configure database and admin account during Installation process.
Add Database configuration in installation steps
Add admin account configuration in installation steps
You can add the following commands in a
RUN
statement in your Dockerfile: