ezsystems / launchpad

CLI tool to bootstrap an eZ Platform project Docker stack | #justcode
https://ezsystems.github.io/launchpad
MIT License
22 stars 26 forks source link

mysql data lost after docker rm -f $(docker ps -a -q) #93

Closed pboethig closed 3 years ago

pboethig commented 3 years ago
Q A
Bug report? yes
Feature request? no
BC Break report? yno
RFC? no
Version x.y.z
Environment Linux/Mac/Windows

Hi,

If i destroy the containers with docker rm -f and rebuild all mysql data are lost. Do i have to add an own mountpoint to store the data on the host?

kind regards

Peter

Plopix commented 3 years ago

Hello, definitely not a bug ;-)

Saving MySQL data on the Host would be a very bad approach. You can do it of course. That is just docker configuration in the docker-compose. (see Docker doc)

I would recommend to use ez dumpdata and to reimport ez importdata those commands would dump and import an archive on your filesystem (host). It allows you to save your databases before to remove the container.

pboethig commented 3 years ago

Hi,

I dont Think that a hostvolume is a Bad Idea. I got 30 gb of data. Ho do you want to prevent dataloss on accidential container crash? i dont Think the default configuration is aware of that. Could This be the reason why ez Sais . Dont use launchpad?

Sébastien Morel notifications@github.com schrieb am So., 4. Okt. 2020, 02:47:

Hello, definitely not a bug ;-)

Saving MySQL data on the Host would be a very bad approach. You can do it of course. That is just docker configuration in the docker-compose. (see Docker doc)

I would recommend to use ez dumpdata and to reimport ez importdata those commands would dump and import an archive on your filesystem (host). It allows you to save your databases before to remove the container.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ezsystems/launchpad/issues/93#issuecomment-703182673, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD44UA5UBXQ4KVEDTCRL7BDSI7A2NANCNFSM4R52MSJA .

Plopix commented 3 years ago

Ibexa(eZ)told you not to use eZ Launchpad? Interesting, I would love to know why, can we know more?

The 30Go situation is indeed an information that will have been good to have in the issue ;)

I think it is still bad to put mysql data on the host. I would use a Docker Named Volume for that.

But that's not related to eZ Launchpad really. You can do all the customizations you want in your docker-compose file in provisioning/dev. As well as using the host to store mysql data if you really want to.

pboethig commented 3 years ago

Thx. persistent volumes came into my mind too. Thx.

I will test it with an acidential container deletion.

For local development i dont see any risk with a hostmount. even performance on Mac is okay. Why you think its a bad idea?

kind regards

Peter

Sébastien Morel notifications@github.com schrieb am So., 4. Okt. 2020, 19:24:

Ibexa(eZ)told you not to use eZ Launchpad? Interesting, I would love to know why, can we know more?

The 30Go situation is indeed an information that will have been good to have in the issue ;)

I think it is still bad to put mysql data on the host. I would use a Docker Named Volume for that.

But that's not related to eZ Launchpad really. You can do all the customizations you want in your docker-compose file in provisioning/dev. As well as using the host to store mysql data if you really want to.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ezsystems/launchpad/issues/93#issuecomment-703287641, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD44UA5Z2AWWZLCVIEJYDVLSJCVULANCNFSM4R52MSJA .

Plopix commented 3 years ago

It is bad because:

You wrote that eZ told you not to use Launchpad, can we know more here. That's something important for future reader off this issue and we/you need to make thing clear ;-)

Thank you

pboethig commented 3 years ago

Okay. understand. At the moment I got not that much performanceissues. Even with this 30G database.

This link is interessting https://medium.com/devops-dudes/docker-volumes-and-bind-mounts-2fb4bd9df09d

Its a good comparision

I see some advantages in named volumes especially the docker cli support.

thx.

I dont know why ibexa consultant tell me not to use it. I dont think so. I got it running in development with good results. Perhaps its about some wired politics.

I know they got some vm solutions for the trainings. But this isnt really usable.

Or perhaps some guys just dont have any glue.

Keep up your great work.

Peter

Sébastien Morel notifications@github.com schrieb am So., 4. Okt. 2020, 20:18:

It is bad because:

  • it is not docker thinking
  • on Mac OS performance are catastrophic (this is why we are using NFS mount point with Launchpad for the code). Read/Write on the Host from within a container is slow with Docker For Mac: really slow. So I guess writing cache needs more than write MySQL but still.

You wrote that eZ told you not to use Launchpad, can we know more here. That's something important for future reader off this issue and we/you need to make thing clear ;-)

Thank you

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ezsystems/launchpad/issues/93#issuecomment-703294644, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD44UA7DA54AWN7U53BDCWDSJC35VANCNFSM4R52MSJA .