Feat: [后台]:docker部署mysql,redis环境

This commit is contained in:
fanxb 2019-07-05 16:33:40 +08:00
parent 32652cc60b
commit e7fd5ebd41
3 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,32 @@
version: "3"
services:
bookmark-mysql:
image: mysql:8.0.16
container_name: bookmark-mysql
ports:
- 3307:3306
networks:
- bookmark
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/temp:/var/lib/mysql-files
- ./mysql/my.cnf:/etc/mysql/my.cnf
- /etc/localtime:/etc/localtime
- ./timezone:/etc/timezone
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_PASS}
bookmark-redis:
image: redis:3.2.10
container_name: bookmark-redis
volumes:
- /etc/localtime:/etc/localtime
- ./timezone:/etc/timezone
networks:
- bookmark
ports:
- 6380:6379
networks:
bookmark:

View File

@ -0,0 +1,30 @@
[mysqld]
port=3306
max_connections=200
max_connect_errors=10
character-set-server=utf8mb4
default_authentication_plugin=mysql_native_password
# 忽略大小写
lower_case_table_names=1
innodb_buffer_pool_size=128M
tmp_table_size=32M
key_buffer_size=32M
# 配置中文分词
#ngram_token_size=2
#ft_min_word_len=2
# 开启慢查询日志记录
set global slow_query_log = on
# 记录阈值单位s
set long_query_time = 0.3
# 设置查询存储方式
set globle log_output = table
[mysql]
default-character-set=utf8mb4
[client]
port=3306
default-character-set=utf8mb4

1
bookMarkDocker/timezone Normal file
View File

@ -0,0 +1 @@
Asia/Shanghai