Git Product home page Git Product logo

Comments (14)

juan131 avatar juan131 commented on August 22, 2024 1

I realize that Moodle folder installation reside at /opt, and /opt is not a part volume on the docker compose.

The directory that is persisted and where the data is recovered is /bitnami/moodle/. As you can check by running:

$ ls  /bitnami/moodle/
config.php  moodledata

The configuration file and the Moodle data directory are the only ones persisted.

If you take a look to the file /opt/bitnami/moodle/config.php:

...
$CFG->dataroot  = '/bitnami/moodle/moodledata';
...

You can check that it's taken the data from the persisted directory. On the other hand, the file /opt/bitnami/moodle/config.php is just a symbolic link to /bitnami/moodle/config.php.

At this moment, the plugins and themes are not automatically recovered from the persistence directory (when deploying docker-compose up). If you want to persist them, you can extract the content at /bitnami/moodle/ and then substitute the /themes folder at /opt/bitnami/moodle/... with a symbolic link as the config.php is.

from bitnami-docker-moodle.

kahidna avatar kahidna commented on August 22, 2024

ok, I already try your suggestion to extract /themes folder for backup the theme and add that folder as a volume when re-init moodle in other instance. and so far it's work. thanks for the help. :)

and what about the plugin, (e.g I install old plugin google analytics) can I do something also to backup the plugin including the configuration? so my moodle will have completely persistent. :)

from bitnami-docker-moodle.

dbarranco avatar dbarranco commented on August 22, 2024

Hi @kahidna

As the same applies with the plugins directories (info here with all the folders that may contain plugins). I've opened an internal task to discuss what can we automate from this to avoid future workarounds.

Note that if you follow this workaround and you backup the themes and plugins, if you launch a new container which uses the persisted data, you will only have to make the symbolic links to those folders while we include them in the container.

I'm sorry for all the inconveniences that this may cause.

from bitnami-docker-moodle.

burkeallen avatar burkeallen commented on August 22, 2024

any updates to the docker image/configuration to address this, not being able to persist the themes and plugins makes this docker implementation on valid for the mostbasic of uses or for simple demo purposes.

from bitnami-docker-moodle.

juan131 avatar juan131 commented on August 22, 2024

I am afraid this issue hasn't been addressed yet @burkeallen ! I will update the associated task to see if we can its priority up. Thanks for your consideration.

from bitnami-docker-moodle.

tompizmor avatar tompizmor commented on August 22, 2024

Hello @burkeallen, @kahidna

Since Bitnami Moodle Docker Image 3.4.0-r1 the whole installation directory is persisted so themes and plugins will remain after container restarts.
Please pull the latest version of the moodle container or use the specific tag:

$ docker pull bitnami/moodle:latest
$ docker pull bitnami/moodle:3.4.0-r1

Tomas

from bitnami-docker-moodle.

kahidna avatar kahidna commented on August 22, 2024

hi @tompizmor, I'm glad bitnami docker moodle's team release a new update.
I see there is update on Readme.md, especially on upgrade section

which said :

As an alternative, you can try upgrading using an updated docker image but any data from the Moodle container will be lost and you will have to reinstall all the plugins and themes you manually added.

so for upgrading moodle and keep the plugin and themes persistent, the only way is upgrading the application inside the container? and say I will migrate to the new server, I should backup the container (because if I pull a new image, mean I have to reinstall all the plugins and themes I manually added) also?

from bitnami-docker-moodle.

tompizmor avatar tompizmor commented on August 22, 2024

Hello @kahidna,

so for upgrading moodle and keep the plugin and themes persistent, the only way is upgrading the application inside the container?

Yes. The reason behind is that the Moodle application does not have a unique folder to store plugins and themes as you can see here. Therefore, there is no way to persist all those plugins directories and ensure that after upgrading Moodle using a new version of the docker image it actually contains all the new source code.

and say I will migrate to the new server, I should backup the container (because if I pull a new image, mean I have to reinstall all the plugins and themes I manually added) also?

Yes. If you want to migrate to a new server you should backup at least the volumes that contain the Moodle and MariaDB data and mount them in the same location that they were originally (/bitnami). Also, it is important that you use the same Moodle version when restoring these volumes.

from bitnami-docker-moodle.

kahidna avatar kahidna commented on August 22, 2024

Since Bitnami Moodle Docker Image 3.4.0-r1 the whole installation directory is persisted so themes and plugins will remain after container restarts.

@tompizmor so the completely persistent moodle only work if I start the moodle service from the very beginning? its not working if I migrate from existing dockerized moodle?

from bitnami-docker-moodle.

tompizmor avatar tompizmor commented on August 22, 2024

@kahidna yes, I am afraid that you would need to start from a fresh Moodle 3.4.0-r1 and install your themes and plugins on top of it.

from bitnami-docker-moodle.

kahidna avatar kahidna commented on August 22, 2024

hi @tompizmor, I just testing backup my second moodle service and restore it on a different server. and it's working, plugin and theme completely backed up. Awesome!!

So for the upgrade just need to stop service, and then pull new image right?

from bitnami-docker-moodle.

tompizmor avatar tompizmor commented on August 22, 2024

Hi @kahidna,

So for the upgrade just need to stop service, and then pull new image right?

No. As you pointed out in this comment, the only way to upgrade the application and preserve themes and plugins is upgrading the application manually inside the container.

from bitnami-docker-moodle.

stale avatar stale commented on August 22, 2024

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

from bitnami-docker-moodle.

stale avatar stale commented on August 22, 2024

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

from bitnami-docker-moodle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.