version: '3'
services:
mysql:
restart: always
image: mysql:5.7.21
container_name: mysql
volumes:
- ./log:/var/log/mysql
- ./data:/var/lib/mysql
- ./conf/my.cnf:/etc/mysql/my.cnf
environment:
- "MYSQL_ROOT_PASSWORD=123456"
- "TZ=Asia/Shanghai"
ports:
- 3306:3306
networks:
- net_db
networks:
net_db:
external: true
评论
发表评论