services:
  rabbitmq:
    image: rabbitmq:4.1-management
    hostname: rabbitmq
    restart: unless-stopped
    environment:
      - RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
      - RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
      - RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbit log_levels [{connection,error},{default,error}] disk_free_limit ${RABBITMQ_DISK_FREE_LIMIT}
    volumes:
      - rabbitmq-data:/var/lib/rabbitmq
    ports:
      - 15672
      - 5672

volumes:
  rabbitmq-data: {}