version: "3.1"
services:
db:
restart: always
container_name: mysql
image: mysql
command:
--lower_case_table_names=1
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
--explicit_defaults_for_timestamp=true
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: root@8888
ports:
- 3306:3306
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/config:/etc/mysql/conf.d
- ./mysql/log:/var/log/mysql
网友评论