From b7fa8d3cf030c89b6a023366c53c1cfe5a2fc656 Mon Sep 17 00:00:00 2001 From: Raul Sanchez Date: Tue, 1 Aug 2017 15:22:32 +0200 Subject: [PATCH] add docker-compose --- templates/rabbitmq-3/2/docker-compose.yml | 54 +++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 templates/rabbitmq-3/2/docker-compose.yml diff --git a/templates/rabbitmq-3/2/docker-compose.yml b/templates/rabbitmq-3/2/docker-compose.yml new file mode 100755 index 0000000..048adc1 --- /dev/null +++ b/templates/rabbitmq-3/2/docker-compose.yml @@ -0,0 +1,54 @@ +version: '2' +services: + rabbitmq: + image: webhostingcoopteam/rabbitmq-conf:0.2.1 + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.sidekicks: rabbitmq-base,rabbitmq-datavolume + {{- if ne .Values.host_label ""}} + io.rancher.scheduler.affinity:host_label: ${host_label} + {{- end}} + volumes_from: + - rabbitmq-datavolume + environment: + - RABBITMQ_NET_TICKTIME=${net_ticktime} + - RABBITMQ_CLUSTER_PARTITION_HANDLING=${cluster_partition_handling} + - CONFD_ARGS=${confd_args} + rabbitmq-datavolume: + network_mode: "none" + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + {{- if ne .Values.host_label ""}} + io.rancher.scheduler.affinity:host_label: ${host_label} + {{- end}} + io.rancher.container.start_once: true + volumes: + - rabbitconf:/etc/rabbitmq + - rancherbin:/opt/rancher/bin + entrypoint: /bin/true + image: rabbitmq:3.6-management-alpine + rabbitmq-base: + network_mode: "container:rabbitmq" + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + {{- if ne .Values.host_label ""}} + io.rancher.scheduler.affinity:host_label: ${host_label} + {{- end}} + image: rabbitmq:3.6-management-alpine + restart: always + volumes_from: + - rabbitmq-datavolume + entrypoint: + - /opt/rancher/bin/run.sh + environment: + - RABBITMQ_ERLANG_COOKIE=${erlang_cookie} +volumes: + rancherbin: + driver: ${VOLUME_DRIVER} + per_container: true + rabbitconf: + driver: ${VOLUME_DRIVER} + per_container: true