docker-compose部署mysql配置

docker-compose部署mysql配置文件如下

复制代码
version: '3'

services:
  mysql:
    image: mysql
    environment:
      - MYSQL_ROOT_PASSWORD=123456
      - MYSQL_DATABASE=wordpress
    volumes:
      - $PWD/conf:/etc/mysql/conf.d
      - $PWD/logs:/logs
      - $PWD/data:/var/lib/mysql
    container_name: db
    ports:
      - "3306:3306"
复制代码

 

posted @   reboot777  阅读(5537)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示