# Extend Pulsar to use RabbitMQ (Message Queue) instead of the REST API
# for communicating with Galaxy.
# Requirements: `docker-compose.pulsar.yml`
# Example: `docker-compose -f docker-compose.yml -f docker-compose.pulsar.yml -f docker-compose.pulsar.mq.yml up`
version: "3"
services:
  galaxy-configurator:
    environment:
      - GALAXY_JOB_RUNNER=pulsar_mq
      - PULSAR_CONFIG_MESSAGE_QUEUE_URL=amqp://pulsar:8jfqi9uo2i30fqoifqfo09@pulsar-rabbitmq/pulsar
      - PULSAR_GALAXY_URL=http://nginx:80
  pulsar-rabbitmq:
    image: rabbitmq:alpine
    container_name: pulsar-rabbitmq
    hostname: pulsar-rabbitmq
    environment:
      - RABBITMQ_DEFAULT_USER=pulsar
      - RABBITMQ_DEFAULT_PASS=8jfqi9uo2i30fqoifqfo09
      - RABBITMQ_DEFAULT_VHOST=pulsar
    volumes:
      - ${EXPORT_DIR:-./export}/pulsar_rabbitmq:/var/lib/rabbitmq:delegated
    networks:
      - galaxy

Add Pulsar with Message Queue setup
Add Pulsar with Message Queue setup

With this setup, Galaxy and Pulsar are able to
communicate using a message queue. For this,
we add a second RabbitMQ container solely
for Pulsar.

Example usage:

> docker-compose -f docker-compose.yml -f docker-compose.pulsar.yml -f docker-compose.pulsar.mq.yml up
