version: '3'
services:
  mysql_middle:
    image: percona/percona-server:5.7
    container_name: mysql_middle
    environment:
      MYSQL_ROOT_PASSWORD: "77jqtG5DMQm3R3PV"
      TZ: "Asia/Shanghai"
    volumes:
      - ./mysql/datad:/var/lib/mysql
      - ./mysql/mysqld.cnf:/etc/my.cnf.d/docker.cnf
    ports:
      - "3306:3306"
    network_mode: "bridge"
    restart: always
  cache_temporary:
    image: redis:5
    container_name: cache_temporary
    volumes:
      - ./redis.conf:/etc/redis/redis.conf
    command: redis-server /etc/redis/redis.conf
    environment:
      - TZ=Asia/Shanghai
    ports:
      - "6379:6379"
    network_mode: "bridge"
    restart: always
  cache_keep:
    image: redis:5
    container_name: cache_keep
    volumes:
      - ./redis/redis.conf:/etc/redis/redis.conf
      - ./redis/data:/data
    command: redis-server /etc/redis/redis.conf
    environment:
      - TZ=Asia/Shanghai
    ports:
      - "6389:6379"
    network_mode: "bridge"
    restart: always
