rommapp / romm

A beautiful, powerful, self-hosted rom manager and player.
https://romm.app
GNU Affero General Public License v3.0
3.08k stars 128 forks source link

[Bug] Wiki docker-compose example doesn't mount /config volume for mariadb #1541

Closed patrickaclark closed 2 weeks ago

patrickaclark commented 2 weeks ago

RomM version 3.7.2

Describe the bug Following the quickstart guide using the example docker-compose.yml file, shows creating a mysql_data volume mounted at /var/lib/mysql for the mariadb data.

The current mariadb:latest build stores databases in /config/databases/

This ends up with docker creating a random number volume to hold /config for the romm-db container

To Reproduce Steps to reproduce the behavior:

  1. Create docker-compose.yml file using the template and guide from the Wiki.
  2. Start the docker stack
  3. attach to the romm-db container
  4. Navigate to the /var/lib/mysql directory
  5. ls -larth to see that directory is empty.
  6. cd to /config/databases and see the mariadb info there.
  7. docker inspect container romm-db
  8. It will show under the Mounts, the mount for your mysql_data per the docker compose, as well as a random numbered hex volume for Destination /config

Expected behavior I expected my db data to be in the mysql_data volume, not in a random volume. This could have been a caused by a change in the mariadb build.

Additional context I am creating this for tracking. If I get time, I will try to pull request the wiki with appropriate edits, but if others want to make that update, it would be welcome as I don't have a lot of time, but just noticed this as a newer user.

adamantike commented 2 weeks ago

The current mariadb:latest build stores databases in /config/databases/

Where have you found that documented? We are aware of /config/databases/ being the mountpoint when using the LinuxServer.io's linuxserver/mariadb image.

Official mariadb image must be using /var/lib/mysql, according to its documentation:

The -v /my/own/datadir:/var/lib/mysql:Z part of the command mounts the /my/own/datadir directory from the underlying host system as /var/lib/mysql inside the container, where MariaDB by default will write its data files.

patrickaclark commented 2 weeks ago

The current mariadb:latest build stores databases in /config/databases/

Where have you found that documented? We are aware of /config/databases/ being the mountpoint when using the LinuxServer.io's linuxserver/mariadb image.

Official mariadb image must be using /var/lib/mysql, according to its documentation:

The -v /my/own/datadir:/var/lib/mysql:Z part of the command mounts the /my/own/datadir directory from the underlying host system as /var/lib/mysql inside the container, where MariaDB by default will write its data files.

I'll build a new instance and test more. But that's where my current instance puts it, and that was not a setting I changed. I should have found time to do that first. I'll close this until I properly confirm it. Apologies.