jimsihk / alpine-moodle

Moodle docker image based on Alpine Linux, NGINX, PHP-FPM and official Moodle
https://hub.docker.com/r/jimsihk/alpine-moodle
MIT License
0 stars 0 forks source link

Upgrade to v4.5.0.01-0 fails #402

Open mtompkins opened 2 hours ago

mtompkins commented 2 hours ago

Upgrade to 405 fails. Logs:

Setting up /etc/nginx/nginx.conf...
Setting up /etc/php/conf.d/custom.ini...
Setting up /etc/php/conf.d/custom-opcache-jit.ini...
Setting up /etc/php/php-fpm.d/www.conf...
Starting startup scripts in /docker-entrypoint-init.d ...

*** Running: /docker-entrypoint-init.d/01-uname.sh

Linux moodle 6.6.56-1-lts #1 SMP PREEMPT_DYNAMIC Thu, 10 Oct 2024 12:04:53 +0000 x86_64 Linux

*** Running: /docker-entrypoint-init.d/02-configure-moodle.sh

Waiting for mariadb:3306 to be ready
Z   
11.5.2-MariaDB-ubu2404 �  &fQC<C{d ��- ��      =   cDha-XU%SS*t mysql_native_password mariadb is ready
Using default file session store
Checking maintenance status...
Maintenance mode will be kept enabled
Upgrading moodle...

== Maintenance mode (https://edu.xxxxxxxxxx) ==

Your site is currently in CLI maintenance mode, no web access is allowed.
Checking moodle code version...
From https://github.com/moodle/moodle
 * branch                MOODLE_405_STABLE -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by checkout:
    lib/classes/check/environment/publicpaths.php
Please commit your changes or stash them before you switch branches.

Aborting

*** Failed with return value: 1

Setting up /etc/nginx/nginx.conf...
Setting up /etc/php/conf.d/custom.ini...
Setting up /etc/php/conf.d/custom-opcache-jit.ini...
Setting up /etc/php/php-fpm.d/www.conf...
Starting startup scripts in /docker-entrypoint-init.d ...

Loop

I tried overriding the entrypoint and doing a git stash in /var/www/html It did not resolve the issue.

jimsihk commented 2 hours ago

Hi, in your /var/www/html directory, is it a separated storage that already with a copy of 404 Moodle?

BTW, you may want to mask some parts of the log in case of server info.

mtompkins commented 2 hours ago

Thanks for the mention of redacting a bit of the logs. Updated.

Hi, in your /var/www/html directory, is it a separated storage that already with a copy of 404 Moodle?

It is a mounted volume with the previous version (if I understand your question correctly).

jimsihk commented 1 hour ago

Then I believe the Moodle 404 also has plugin installed? Are they installed via the web interface or installed via scripts (e.g. the install-plugin-list provided in the image)?

If via scripts, one quick workaround could be preparing a new volume to store only the 405 version and install plugin on top of that, then switch to this new container.

What I am doing is build a new image with the list of plugin downloaded at build time. Then using mounted volume for the /var/www/data folder only. And disallow plugin installation via the web interface to ensure no missing plugins in the image.