From 2a0d49c53908827b8910ac4e468f577eca10a395 Mon Sep 17 00:00:00 2001 From: Chris Raible Date: Thu, 12 Sep 2024 09:38:24 -0700 Subject: [PATCH] Added MySQL data volume to docker compose (#20982) no issue - This allows us to run `docker-compose down` or to restart docker desktop without losing all our local databases - Added a data volume to the MySQL service in the `docker-compose.yml` file to persist the data between container restarts - The `yarn docker:reset` command will still reset all the data in the database since it uses `down -v` to remove the volumes as well --- .github/scripts/docker-compose.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/scripts/docker-compose.yml b/.github/scripts/docker-compose.yml index a8d89941f7d..43a67ffbcad 100644 --- a/.github/scripts/docker-compose.yml +++ b/.github/scripts/docker-compose.yml @@ -17,6 +17,7 @@ services: volumes: # Turns out you can drop .sql or .sql.gz files in here, cool! - ./mysql-preload:/docker-entrypoint-initdb.d + - mysql-data:/var/lib/mysql healthcheck: test: "mysql -uroot -proot ghost -e 'select 1'" interval: 1s @@ -36,4 +37,6 @@ services: - "9411:9411" restart: always environment: - COLLECTOR_ZIPKIN_HOST_PORT: :9411 \ No newline at end of file + COLLECTOR_ZIPKIN_HOST_PORT: :9411 +volumes: + mysql-data: