欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

docker-compose

程序员文章站 2022-03-05 13:35:36
...
version: '3.9'
services:
  mysql:
    image: mysql:8.0.22
    restart: always
    ports: 
      - "3306:3306"
    volumes: 
      - /my/own/data:/var/lib/mysql
      - /my/own/config:/etc/mysql/conf.d
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_ROOT_HOST: '%'
  redis:
    image: 'redis:6.0.9'
    restart: always
    ports: 
      - "6379:6379"
    volumes: 
      - /usr/local/docker/redis.conf:/etc/redis/redis.conf
      - /usr/local/docker/data:/data
    command: 
      redis-server /etc/redis/redis.conf --appendonly yes

 

相关标签: java实现