Page MenuHomePhabricator

[keyserver] Specify Docker volume for MySQL
ClosedPublic

Authored by ashoat on Jun 1 2022, 2:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 12:29 AM
Unknown Object (File)
Mon, Dec 16, 12:29 AM
Unknown Object (File)
Fri, Dec 6, 6:29 PM
Unknown Object (File)
Sun, Nov 24, 9:33 AM
Unknown Object (File)
Nov 9 2024, 11:40 AM
Unknown Object (File)
Nov 9 2024, 11:40 AM
Unknown Object (File)
Nov 8 2024, 8:07 AM
Unknown Object (File)
Nov 5 2024, 2:00 AM

Details

Summary

I spent a bunch of time reading through Docker docs and other materials about how to handle persistence. It seems there are two big options: volumes and bind mounts.

I opted against bind mounts since I never find myself inspecting /var/lib/mysql directly (exporting data is best handled by mysqldump), and there are some benefits to how Docker handles volumes.

Linear task: https://linear.app/comm/issue/ENG-1069/figure-out-persistence-in-docker

Depends on D4178

Test Plan
  1. Make sure docker-compose down -v && docker-compose up --build still works
  2. Make sure docker-compose down -v deletes the volume but docker-compose down doesn't
  3. Make sure docker-compose up --build doesn't recreate the volume if it already exists

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat requested review of this revision.Jun 1 2022, 2:55 AM

Don't have any experience with volumes in docker, but checked this against the example here: https://docs.docker.com/storage/volumes/#use-a-volume-with-docker-compose and it looks correct.

This revision is now accepted and ready to land.Jun 1 2022, 8:23 AM