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;"'