Skip to content

RabbitMQ

docker-compose.yml

YAML
  rabbitmq:
    image: rabbitmq:3-management-alpine
    hostname: rabbitmq    # Good to have if you want to perssist data, cause rabbit creates folder based on (containers) hostname
    ports:
      - "5672:5672"
      - "15672:15672"
    volumes:
      - ./rabbitmq-data/:/var/lib/rabbitmq/mnesia/
    environment:
      - AUTOCLUSTER_CLEANUP=true
      - CLEANUP_WARN_ONLY=false
      - CONSUL_SVC_ADDR_AUTO=true
      - RABBITMQ_ERLANG_COOKIE="PlaceHereYourSecretErlangCookie"
      - RABBITMQ_DEFAULT_VHOST=/
      - RABBITMQ_DEFAULT_USER=admin
      - RABBITMQ_DEFAULT_PASS=LPVWLf5JNgm7CZ
      - RABBITMQ_CONFIG_FILE=/tmp/rabbitmq
    restart: unless-stopped
Back to top