From 0b56e4fc97129c27f3dc8e01bb318ac958ab7787 Mon Sep 17 00:00:00 2001 From: mlogclub Date: Tue, 17 Sep 2024 10:16:09 +0800 Subject: [PATCH] update docker-compose.yml --- .gitignore | 3 ++- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 80b69bb46..1b7f07267 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ dist *.log .DS_Store node_modules -.nuxt \ No newline at end of file +.nuxt +.docker-compose/mysql/data \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 66592554e..be3e6457b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: MYSQL_ROOT_PASSWORD: 123456 volumes: - .docker-compose/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d # 初始化脚本件目录, 这个目录中的.sh/sql文件会以字母顺序依次执行 - - /data/mysql:/var/lib/mysql # 挂载数据件目录.如果非root账号执行,挂载目录必须是登录账号下目录 + - .docker-compose/mysql/data:/var/lib/mysql # 挂载数据件目录;如果非root账号执行,挂载目录必须是登录账号下目录 restart: always healthcheck: test: '/usr/bin/mysql --user=bbsgo --password=123456 bbsgo_db --execute "SHOW TABLES;"'