2017网站建设报价方案,手机上制作网页,wordpress文章推广插件,网站建设公司出路整个工具的代码都在Gitee或者Github地址内
gitee#xff1a;solomon-parent: 这个项目主要是总结了工作上遇到的问题以及学习一些框架用于整合例如:rabbitMq、reids、Mqtt、S3协议的文件服务器、mongodb
github#xff1a;GitHub - ZeroNing/solomon-parent: 这个项目主要是…整个工具的代码都在Gitee或者Github地址内
giteesolomon-parent: 这个项目主要是总结了工作上遇到的问题以及学习一些框架用于整合例如:rabbitMq、reids、Mqtt、S3协议的文件服务器、mongodb
githubGitHub - ZeroNing/solomon-parent: 这个项目主要是总结了工作上遇到的问题以及学习一些框架用于整合例如:rabbitMq、reids、Mqtt、S3协议的文件服务器、mongodb
1.新增data文件夹
2.新增docker-compose.yml文件
version: 3.8services:rabbitmq:image: rabbitmq:managementcontainer_name: rabbitmqports:- 15672:15672- 5672:5672volumes:- ./start-rabbitmq-with-plugin.sh:/usr/local/bin/start-rabbitmq-with-plugin.sh- ./data:/usr/etc/rabbitmq/data- /etc/localtime:/etc/localtime # 容器与宿主机时间同步command: [/bin/bash, -c, chmod x /usr/local/bin/start-rabbitmq-with-plugin.sh /usr/local/bin/start-rabbitmq-with-plugin.sh]restart: always
3.新增start-rabbitmq-with-plugin.sh脚本
#!/bin/bash# 安装 wget
if ! command -v wget /dev/null
thenecho wget not found, installing...apt-get update apt-get install -y wgetif [ $? -ne 0 ]; thenecho Failed to install wgetexit 1fi
elseecho wget is already installed
fi# 创建插件目录如果不存在的话
mkdir -p /plugins# 下载 RabbitMQ 延迟消息插件
if [ ! -f /plugins/rabbitmq_delayed_message_exchange-3.13.0.ez ]; thenecho Downloading rabbitmq_delayed_message_exchange plugin...wget -O /plugins/rabbitmq_delayed_message_exchange-3.13.0.ez \https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/v3.13.0/rabbitmq_delayed_message_exchange-3.13.0.ezif [ $? -ne 0 ]; thenecho Failed to download rabbitmq_delayed_message_exchange pluginexit 1fi
elseecho Plugin already downloaded
fi# 修改插件文件权限
echo Setting permissions for the plugin...
chmod 644 /plugins/rabbitmq_delayed_message_exchange-3.13.0.ez# 启用插件
echo Enabling the plugin...
rabbitmq-plugins enable rabbitmq_delayed_message_exchange# 启动 RabbitMQ 服务
echo Starting RabbitMQ server...
rabbitmq-server