title: Using rabbitmq with docker in production
body: <p>I currently have a small server running in a docker container, the server uses RabbitMQ which is being run by docker-compose using the <a href="https://hub.docker.com/_/rabbitmq" rel="noreferrer">DockerHub image</a>.</p>
  
  <p>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 <a href="https://www.rabbitmq.com/production-checklist.html#resource-limits-disk-space" rel="noreferrer">disk space limit</a> described at RabbitMQ production checklist.</p>
  
  <p>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.</p>
  
  <p>My docker-compose file:</p>
  
  <pre><code>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
  </code></pre>