Moving mysql mount volume inside project folder. Is it secure?

Hi!

I’m trying to have a pen drive with whole Devilbox inside it, so I can switch computers and keep working in the same projects. Just plug the pen, and my projects are there.

The question is about the database volumes. Project files are ok, it works. But the database is mounted in /var/lib/…

What is the proper way to move this volume to another location?

Right now I have Devilbox in ~/Devilbox and project files in ~/www-projects. I’d like to have the database volume mounted in something like ~/www-databases.

Is it ok to replace, in docker-compose.yml file, this line

  • devilbox-{MYSQL_SERVER}:/var/lib/mysql:rw{MOUNT_OPTIONS}

with this one?

  • devilbox-{MYSQL_SERVER}:HOST_PATH_HTTPD_DATADIR:rw{MOUNT_OPTIONS}

I’m not sure about the rw${MOUNT_OPTIONS} part. Is it possible?

Thanks!!