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)
Tue, Jun 25, 1:17 AM
Unknown Object (File)
Sun, Jun 23, 2:23 PM
Unknown Object (File)
Fri, Jun 21, 3:11 PM
Unknown Object (File)
Fri, Jun 21, 9:21 AM
Unknown Object (File)
Sun, Jun 16, 4:01 PM
Unknown Object (File)
Sun, Jun 16, 4:01 PM
Unknown Object (File)
Sun, Jun 16, 4:01 PM
Unknown Object (File)
Sun, Jun 16, 3:17 PM

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