Comments (6)
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.
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.
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.
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.
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.
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)
- MacOS Selenium ARM Images HOT 2
- Add MOODLE_DOCKER_DBHOST HOT 3
- breakpoints for phpUnit Tests when running in the container HOT 5
- Document Docker CLI version requirements HOT 4
- Invalid interpolation format HOT 2
- Webserver exits on M1 HOT 11
- Add support for new sqlsrv driver that is using odbc18 HOT 1
- help: fresh install keeps logining out as time out HOT 10
- Switch from mailhog to mailpit
- interest on having wrapping scripts? HOT 2
- Issue with Windows WSL2 and latest version of moodle docker HOT 4
- Add support for local certificates for Windows
- Forbidden HOT 5
- Mailpit UI no longer accessible HOT 1
- Cover mailpit with some integration tests
- HEADs UP: This repo has moved from "master" to "main"
- Env var to flag moodle-docker environment running HOT 5
- Document AMD build step HOT 6
- Allow Behat timeout be increased via an environment variable HOT 1
- Upgrade composer files to newer version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moodle-docker.