Docker Questions

Hi there,

I’ve am trying to convert my Seafile installation over to the new Docker image, and have a few questions. Optimally, I’d like to do a back up and restore of my existing install into the new docker install, but I have a fairly small setup so a restart would not be all that bad.

My main question is around the built-in MySQL database included in the docker image. Should I be using this instead of a stand alone MySQL install? If i blow away the container and recreate it, will the data persist via the volume?

I was also wondering if anyone else has converted an existing install over to the new docker image, and if they have any best practices or advice?

Thanks in advance!

On Github you can see how it all works. The data is nearly always outside a container, and even the DB files of MariaDB are outside with the -v (volume) option of docker. Unfortunally, there is today no option to use an existing MariaDB server, maybe in a future version.

You could just exec bash within the container and restore your databases replacing the ones existing in the docker container. Then stop the container, put the data in place and start it again. Everything should run fine. Make sure to upgrade to the same version you want to use with docker before doing a database backup on the host and restore in the container.

Thanks bionade and shoeper.

I was actually just trying do do the restore, and ended up getting page unavailable after logging in. It is probably because I didn’t think to update my install to the same version of the docker first. Thanks for mentioning that!

Thanks again for the pointers. After upgrading my existing install, I was able to do a backup and restore to the docker install. So far its working great!

just change the seafile.conf and seahub_settings in your docker Volume.
for Example:
/var/lib/docker/volumes/seafileVolume/_data/conf/seafile.conf