artefactual-labs / am

Development environment for Archivematica
https://archivematica.org
GNU Affero General Public License v3.0
10 stars 20 forks source link

Add MySQL config file to override default settings #93

Closed mamedin closed 4 years ago

mamedin commented 4 years ago

The new am-tuning.cnf file overrides some MySQL settings that are often too low in default deployments.

The following variables have been added to the file:

Mounting the am-tuning.cnf as a new volume with a relative path on the docker host allows to apply changes in MySQL easily. The user only needs to change that file in the docker host, and then restart or rebuild the container.

Connects to https://github.com/archivematica/Issues/issues/956

mamedin commented 4 years ago

The bad news is that by adding this file to the container the volume of the container is reset. If you want to maintain the database you have to backup it and restore it after rebuilding the container.

I don't know if it's worth adding to README file how to take a backup and restore the database.

jraddaoui commented 4 years ago

The bad news is that by adding this file to the container the volume of the container is reset. If you want to maintain the database you have to backup it and restore it after rebuilding the container.

I don't know if it's worth adding to README file how to take a backup and restore the database.

Hi @mamedin, running docker-compose up -d (without the --force-recreate or --build flags) should be enough to pick up the new configuration while preserving the mysql_data volume.

mamedin commented 4 years ago

Thanks!

I updated the vars to lower values, and added a brief section in README.md.

mamedin commented 4 years ago

Thanks @mamedin with the two small changes below I can run this and see the values change as I modify them. The defaults look good.

Thanks Ross, I added your suggestion. Good catch!!