Code Monkey home page Code Monkey logo

Comments (6)

abias avatar abias commented on September 15, 2024

Hi Dan,

For doing manual testing, we don't want our docker environments to be completely torn down and recreated each time.

I completely agree with this need for our use cases.

I think docker-compose does some sort of volume persistance itself, especially if you use stop rather than down. But I have not looked into this at all

I'm not a Docker expert yet, but I have seen than with
bin/moodle-docker-compose stop
and
bin/moodle-docker-compose start
you can stop and start the docker containers and the containers will still have their data, even if the whole docker environment is shut down and restarted in the meantime.

So, do you think there is anything left to do or unsure?
If not, I would create a PR to add this information to the README.md.

We might want explict mounted data directories

Could you please elaborate what you mean with this sentence so that I can understand the problem you are seing?

Thanks,
Alex

from moodle-docker.

scara avatar scara commented on September 15, 2024

Hi @abias,
trying to anticipate Dan's reply, that means assigning real folders (i.e. somewhere out of the container, e.g. in the host) where to safely store what required to persist the tests setup (or some hacking done while investigating a failure) i.e. the database and the fixtures as deployed into Moodle i.e. the so called moodle data.
Read more at https://docs.docker.com/compose/compose-file/compose-file-v2/#volumes-volume_driver.

Since this setup is for dev/test purposes I'm keen to second your idea of PR w/o the need to expore more optional params to give persistance to the environment: anyone playing with down will be warned about the lacking of persistance by design.
Indeed, the only drawback I found w/ this lacking is when switching among different DBs which requires a down=>export MOODLE_DOCKER_DB=<other_db_type>=>up -d sequence but I'm fine with missing the status while switching.

HTH,
Matteo

from moodle-docker.

abias avatar abias commented on September 15, 2024

Hi Matteo,

thank you for your feedback.

trying to anticipate Dan's reply, that means assigning real folders (i.e. somewhere out of the container, e.g. in the host) where to safely store what required to persist the tests setup (or some hacking done while investigating a failure) i.e. the database and the fixtures as deployed into Moodle i.e. the so called moodle data.
Read more at https://docs.docker.com/compose/compose-file/compose-file-v2/#volumes-volume_driver.

Allright, I understood this now. I think this is really some "extended usage" which Dan or anyone else can think about if this should be officially supported.

Since this setup is for dev/test purposes I'm keen to second your idea of PR w/o the need to expore more optional params to give persistance to the environment: anyone playing with down will be warned about the lacking of persistance by design.

I added a note to README in PR #54. Please feel free to comment on the PR if you have improvement proposals.

Indeed, the only drawback I found w/ this lacking is when switching among different DBs which requires a down=>export MOODLE_DOCKER_DB=<other_db_type>=>up -d sequence but I'm fine with missing the status while switching.

So you mean that to switch the underlying DBMS, you have to destroy the containers and rebuild the containers completely and it would be nice to be able to switch the DBMS while keeping the data inside the DB? From my point of view, this is an edge case and you would have to deal with all the same obstacles like you have it in production when moving from one DBMS to another while keeping production data. Do you think Docker can help here in any way?

from moodle-docker.

scara avatar scara commented on September 15, 2024

Do you think Docker can help here in any way?

I think that what written in #55 describes what docker could and couldn't do w/o any further code.

For the record, I'm not talking here about moving data between different DB types but the ability to use them concurrently, even more versions of the same DB type.

HTH,
Matteo

from moodle-docker.

danpoltawski avatar danpoltawski commented on September 15, 2024

A very common use case here which i don't think is handled with just the 'stop and start', is for example using the same data for both a php56 install and php71 install - being able to quickly test on both versions of php without completely duplicating an install.

from moodle-docker.

danpoltawski avatar danpoltawski commented on September 15, 2024

I think the new bits of readme and other pull request are probably enough to keep open for now with work to be done, so i'll close this.

from moodle-docker.

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.