HomePhabricator
Diffusion Comm cf912ab03f7b

[keyserver] Specify Docker volume for MySQL

Description

[keyserver] Specify Docker volume for MySQL

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

Reviewers: palys-swm, atul

Reviewed By: atul

Subscribers: Adrian, yayabosh

Differential Revision: https://phabricator.ashoat.com/D4179

Details

Provenance
ashoatAuthored on Jun 1 2022, 2:40 AM
Reviewer
atul
Differential Revision
D4179: [keyserver] Specify Docker volume for MySQL
Parents
rCOMMfc22a7ffc480: [keyserver] Run Docker as non-root user
Branches
Unknown
Tags
Unknown