version: "2" services: rabbit: image: rabbitmq:3.7-alpine ports: - "5672:5672" # persistent data needs a consistent hostname hostname: crunchy_carrot environment: # RABBITMQ_DEFAULT_USER: rabbit # RABBITMQ_DEFAULT_PASS: carrot RABBITMQ_HIPE_COMPILE: 1 volumes: - ./rabbitmq-data:/var/lib/rabbitmq # data will be stored in /var/lib/rabbitmq/mnesia/rabbit@HOSTNAME