Using rabbitmq with docker in production

I currently have a small server running in a docker container, the server uses RabbitMQ which is being run by docker-compose using the DockerHub image.

It is running nicely, but I’m worried that it may not be properly configured for production (production being a simple server, without clustering or anything fancy). In particular, I’m worried about the disk space limit described at RabbitMQ production checklist.

I’m not sure how to configure these things through docker-compose, as the env variables defined by the image seem to be quite limited.

My docker-compose file:

version: '3.4'
services:
  rabbitmq:
    image: rabbitmq:3-management-alpine
    ports:
      - "5672:5672"
      - "15672:15672"
    volumes:
      - rabbitmq:/var/lib/rabbitmq
    restart: always
    environment:
      - RABBITMQ_DEFAULT_USER=user
      - RABBITMQ_DEFAULT_PASS=secretpassword

  my-server:
   # server config here

volumes:
  rabbitmq:

networks:
  server-network:
    driver: bridge

Source: StackOverflow