Closed jtorreggiani closed 2 years ago
Hi @jtorreggiani,
what version of Moodle did you download?
Did you use the moodle-docker
toolbox for the very first time i.e. do you have locally the latest images of each service composing the toolbox, including the code of the compose?
TIA, Matteo
Thank you for the prompt response @scara!
I downloaded the main version from the Github https://github.com/moodle/moodle. So that would be 4.0dev+?
I ran all the setup required for the moodle-docker
repository locally from what I can tell. The latest images are getting pulled and the containers seem to start with no problem.
I've also tried checking out MOODLE_38_STABLE and running moodle-docker
with the same issue of the install_database.php
script hanging.
Hi @jtorreggiani,
I just gave the actual 4.0 alpha (2021102900.03
, b16fc54
) a try:
export MOODLE_DOCKER_WWWROOT=/path/to/moodle/master
export MOODLE_DOCKER_DB=pgsql
export MOODLE_DOCKER_PHP_VERSION=7.3
export MOODLE_DOCKER_WEB_HOST=192.168.0.60
cp config.docker-template.php $MOODLE_DOCKER_WWWROOT/config.php
bin/moodle-docker-compose up -d && bin/moodle-docker-wait-for-db
bin/moodle-docker-compose exec webserver php admin/cli/install_database.php \
--agree-license \
--fullname="Docker moodle" \
--shortname="docker_moodle" \
--summary="Docker moodle site" \
--adminpass="test" \
--adminemail="admin@example.com"
Please note that I'm using an "external" Docker Host on a "recent version" of both Engine and Compose so I need the patch below too - that is required to bind the instance to something different from the default 127.0.0.1
:
git diff
diff --git a/webserver.port.yml b/webserver.port.yml
index bff93e6..93cea90 100644
--- a/webserver.port.yml
+++ b/webserver.port.yml
@@ -4,4 +4,4 @@ services:
environment:
MOODLE_DOCKER_WEB_PORT: "${MOODLE_DOCKER_WEB_PORT}"
ports:
- - "${MOODLE_DOCKER_WEB_PORT}:80"
+ - "${MOODLE_DOCKER_WEB_HOST}:${MOODLE_DOCKER_WEB_PORT}:80"
I was able to successfully log into the instance via http://vm-docker01:8000
and then trashed everything by issueing:
bin/moodle-docker-compose down -v
HTH, Matteo
I've just run the install_database.php
here without any problem, only note is that the -->System
step can take quite long (in my mac laptop, that is powerful, but specially slow for docker, it took ~5 minutes), there are a few hundred tables to be created. But once that step is done, the rest of plugins are installed visibly quickly (each one has only a few tables, compared with System).
You can watch what your containers are doing using docker stats
while the installation is happening, it's easy to see if they are idle or doing something.
But, as far as it's working, I'm going to close this issue now. Thanks for reporting!
Hello! Firstly, this is an awesome project. Thank you for putting this together!
I'm running into an issue that I'm hoping someone here can help with. I setup a local version of Moodle via git following the directions on the Moodle Docs. With my local version of Moodle downloaded, I then ran the follow setup code.
However, when I try the instructions from the "Use containers for manual testing" section like so
The command seems to hang with the following output
I've tried this using Postgresql, Mysql, and MariaDB, all with the same problem. When I visit localhost:8000, I get an error saying an upgrade is in progress. However, this command seems to never finish.
Running
bin/moodle-docker-compose logs db
for Mysql and MariaDB didn't seem to indicate the database wasn't functioning properly. But running theinstall_database.php
command for those databases also didn't trigger additional db logs to be emitted. For Postgresql I noticed the following error.Am I missing something from this setup? Any help would be greatly appreciated. Thanks for your time.