Closed abias closed 3 years ago
Hi @abias,
+1 for a Moodle issue too; there is IMHO an unbalance between admin/cli/install.php
and admin/cli/install_database.php
, respectively:
Options:
--chmod=OCTAL-MODE Permissions of new directories created within dataroot.
Default is 2777. You may want to change it to 2770
or 2750 or 750. See chmod man page for details.
--lang=CODE Installation and default site language.
--wwwroot=URL Web address for the Moodle site,
required in non-interactive mode.
--dataroot=DIR Location of the moodle data folder,
must not be web accessible. Default is moodledata
in the parent directory.
--dbtype=TYPE Database type. Default is mysqli
--dbhost=HOST Database host. Default is localhost
--dbname=NAME Database name. Default is moodle
--dbuser=USERNAME Database user. Default is root
--dbpass=PASSWORD Database password. Default is blank
--dbport=NUMBER Use database port.
--dbsocket=PATH Use database socket, 1 means default. Available for some databases only.
--prefix=STRING Table prefix for above database tables. Default is mdl_
--fullname=STRING The fullname of the site
--shortname=STRING The shortname of the site
--summary=STRING The summary to be displayed on the front page
--adminuser=USERNAME Username for the moodle admin account. Default is admin
--adminpass=PASSWORD Password for the moodle admin account,
required in non-interactive mode.
--adminemail=STRING Email address for the moodle admin account.
--upgradekey=STRING The upgrade key to be set in the config.php, leave empty to not set it.
--non-interactive No interactive questions, installation fails if any
problem encountered.
--agree-license Indicates agreement with software license,
required in non-interactive mode.
--allow-unstable Install even if the version is not marked as stable yet,
required in non-interactive mode.
--skip-database Stop the installation before installing the database.
-h, --help Print out this help
vs:
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.e. missing some required options (--summary=STRING
=> install_cli_database()
) and the need, here, to set others ($CFG->noreplyaddress
) at least into config.docker-template.php
e.g. no-reply@example.com
since the default no-reply email address, if not set, is defined using the hostname of the Moodle instance here, by default - see getenv('MOODLE_DOCKER_WEB_HOST')
- localhost
.
HTH, Matteo
Yeah, in fact I'm tired of that when installing new sites, lol. I've it annotated here since ages ago. Or we relax the check (to allow those IP/localhost cases) or we provide a better default).
Hi all, this has always been an irritation on new Docker sites for me and seeing @abias' issue here just reminded me
I've created https://tracker.moodle.org/browse/MDL-70643 regarding use of the --summary
argument in the install database CLI
Steps to reproduce:
Expected result:
Actual result:
Note: This issue might also simply be a Moodle core issue and not a special Moodle-Docker issue. However, I report it here first as I have only encountered it in Moodle-Docker up to now and it affects especially Moodle-Docker admins who create instances on a daily basis.
If I will be told that this isn't a speciality of Moodle-Docker, I will create an issue in Moodle tracker for this behaviour.
Thanks, Alex