version: '3'

services:
  mysql:
    image: mysql:5.7.24
    container_name: mysql
    environment:
      MYSQL_ROOT_PASSWORD: 123456
    ports:
      - 3306:3306
    volumes:
      - /febs/mysql/data:/var/lib/mysql #挂载 MySQL数据
  redis:
    image: redis:4.0.14
    container_name: redis
    command: redis-server /usr/local/etc/redis/redis.conf --appendonly yes
    volumes:
      - /febs/redis/data:/data #挂载 Redis数据
      - /febs/redis/conf/redis.conf:/usr/local/etc/redis/redis.conf #挂载 Redis配置
    ports:
      - 6379:6379
  rabbitmq:
    image: rabbitmq:3.7.15-management
    container_name: rabbitmq
    volumes:
      - /febs/rabbitmq/data:/var/lib/rabbitmq #挂载 RabbitMQ数据
      - /febs/rabbitmq/log:/var/log/rabbitmq #挂载 RabbitMQ日志
    ports:
      - 5672:5672
      - 15672:15672