RabbitMQ container with Docker Compose

RabbitMQ container with Docker Compose


Docker Compose facilitates spinning up a container for the RabbitMQ broker without installing it locally.



Prerequisites



Configuration

The following configuration spins up the RabbitMQ container with the management UI tool.

The connection string for the RabbitMQ broker with local virtual host is amqp://localhost:5672/local.

RabbitMQ management UI is available at the http://localhost:15672 link. Default credentials are guest as username and guest as password.

# docker-compose.yml
version: '3.8'

services:
  rabbitmq:
    image: rabbitmq:3-management
    ports:
      - 5672:5672
      - 15672:15672
    environment:
      - RABBITMQ_DEFAULT_VHOST=local
    volumes:
      - 'rabbitmq_data:/data'

volumes:
  rabbitmq_data:
Enter fullscreen mode

Exit fullscreen mode

Run the following command to spin up the container.

docker-compose up
Enter fullscreen mode

Exit fullscreen mode



Boilerplate

Here is the link to the boilerplate I use for the development.



Source link
lol

By stp2y

Leave a Reply

Your email address will not be published. Required fields are marked *

No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.