mriedmann / humhub-docker

Alpine-based PHP-FPM and NGINX HumHub docker-container
MIT License
95 stars 79 forks source link

DB Volume Mapping #213

Closed ItsNoted closed 2 years ago

ItsNoted commented 3 years ago

How can we map the DB volume for persistence? I'd like to be able to backup the DB files.

mriedmann commented 3 years ago

Hi! I am assuming you used the docker-compose file from this repo right? Humhub (and so this image) uses the official mariadb image. To see how to map the db directories please see the documentation there to get the right volume mount settings (https://hub.docker.com/_/mariadb).

timaschew commented 2 years ago

This file is called docker-compose.prod.yml but it's not for prod! It's missing DB volumes.

Even the the normal compose should have this DB volumes. It doesn't make sense to not having it. I've just realized after I was restarting my "test" instance via docker-compose down and tried to start it again. I was shocked, that all my DB data is gone now, because I spend so much time to configure it, etc.

UnFortunately the volume was not gone and docker volume ls and docker volume inspect helped me to recover the mysql data.

mriedmann commented 2 years ago

you are right. The name is misleading. The initial idea of this compose file is that we can test a "splitted" (nginx, php-fpm seperated) setup in CI. All currently available docker-compose files are not really meant to be used for real production without modification. I am sorry that this is not clearly stated anywhere, I will correct this as fast as possible.