I want to make an unattended installation of Moodle.
We're using docker because we will have several installations (see GitHub repo https://github.com/juanda99/moodle-docker-production)
- Right now we create through code just database variables so we generate the config.php and the installation screen goes to the test dependencies page. I think we have "jump" the admin/cli/install.php script (I'm pretty bad reading php).
We would like to insert all our data: moodle site, url, title site, language... and install it without human interaction.
I've seen this script in the admin cli:
-----
root@moodle:/var/www/html# /usr/local/bin/php admin/cli/install_database.php --help
Advanced command line Moodle database installer.
Please note you must execute this script with the same uid as apache.
Site defaults may be changed via local/defaults.php.
Options:
--lang=CODE Installation and default site language. Default is en.
--adminuser=USERNAME Username for the moodle admin account. Default is admin.
--adminpass=PASSWORD Password for the moodle admin account.
--adminemail=STRING Email address for the moodle admin account.
--agree-license Indicates agreement with software license.
--fullname=STRING Name of the site
--shortname=STRING Name of the site
-h, --help Print out this help
----
I guess I can execute it through code and then I'll have all my installation finished. Is it that way?
I would also like to install a theme and some plugins. Can it also be done unattended?
If not, I'm thinking about executing a complete installation and make a database export. For a new installation, use this backup and the search and replace tool