Moodle with git and postgres

What do you think about using git for managing updates in the Moodle module?

https://docs.moodle.org/38/en/Git_for_Administrators

This way we are very flexible and could just say I want to update to version 3.x, put it to a db prop, signal-event and ready. (maybe one day choose it in a cockpit dropdown) I have to test downgrades but it may work too.
But we could have more problems as updates are not controlled anymore.

Another point is: I tend to use postgresql instead of mysql for moodle.

From the moodle docs:

If you run your Moodle site with MySQL database backend and use the default MyISAM as the storage engine for your tables, you may want to convert them to use some more reliable engine like InnoDB (actually, you should want to switch to PostgreSQL :wink: anyway).

1 Like

Hi Markus,

In the document I wrote about Moodle, I used git to get the files for installation then for updates: NethServer-201, Cahier-05:Moodle – Boutique Micronator

I looked back at my document to see how I did it exactly and at the beginning of the Update chapter, I had put 2 notes:

Here, updating does not mean upgrading to a higher version of Moodle, but only updating the files of the current branch.

The git utility only updates the main Moodle code. If extensions are typically installed (via the Moodle user interface), they are neither updated nor upgraded by git commands to update the kernel, but rather via the user interface of Moodle.

Then in the following first paragraph I have a link about update: Git pour administrateurs — MoodleDocs which I think is the same as yours.

I used MariaDB-10.2 with utf8mb4. InnoDB is the default with this DB.
I also used Moodle-3.5 as it is a LTS.

Michel-André

1 Like

You are right. Sorry for confusion. There’s not a real update, you pull the whole code and just switch the branch to use a version.
My question was more about if we need this “git flexibility” to just switch version or stay with controlled updates.
In the meanwhile I think I’ll keep the controlled updates. If one wants to use git it should just be possible within the module.

I saw lot of mysql optimization with innodb and barracuda in the moodle docs until I found the recommendation to use postgresql.
Do you think we should use mariadb? I saw CentOS 8 uses mariadb 10.3 or postgresql 10 so I’d opt for one of them…

Is it better to stick to the LTS or should we go “bleeding edge”?

Hi Markus,

Usually, I try to use the rh-mariadb102 Collection but for the next document, I will try 103.

For PostgreSQL, I always use version-11 which now is at 11.6.
After installation, I used yum-plugin-protectbase to protect [pgdg11] in /etc/yum.repos.d/pgdg-redhat-all.repo. In that section I insert protect = 1 so the updates for PostgreSQL-11 will only come from [pgdg11].

For my documentations, I always prefer to use LTS as there are less suprises with them and also, I don’t have to update the documents so often.

On the other hand, I cannot recommend anything to you, because I consider that you know much more than me on these subjects.
As example, after playing around with Zammad, from now on, I will try to always use your Nginx installation as Nginx is the most used web engine, even more than Apache.

Michel-André

Thanks for your inputs.

I am not a moodle expert or power user, I just like to integrate a nice package. So I need inputs of people with more moodle experience.
As regards LTS I think it always depends on the project, for example if there are many new good plugins and if they’re usable with the LTS version.

Nethserver makes intensive use of apache so I tend to use it if possible but for some apps I needed nginx.

1 Like