首次发布
This commit is contained in:
commit
4b9431e1e2
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/data/*
|
41
README.md
Normal file
41
README.md
Normal file
@ -0,0 +1,41 @@
|
||||
# 基于docker启动的rabbitmq服务
|
||||
|
||||
## 镜像
|
||||
|
||||
`quay.io/wandoubaba517/rabbitmq:3.13.4`
|
||||
|
||||
这个镜像是基于Docker Hub上的官方`rabbitmq:3.13.4`制作,安装并开启了了`rabbitmq_delayed_message_exchange`插件,开启了`rabbitmq_stomp`服务。
|
||||
|
||||
支持`amd64`架构和`arm64`架构。
|
||||
|
||||
## 配置默认用户名密码
|
||||
|
||||
在首次启动前修改`conf/conf.d/10-defaults.conf`文件中的`default_user`和`default_password`,会自动创建用户。
|
||||
|
||||
## 启动服务
|
||||
|
||||
```sh
|
||||
./start
|
||||
```
|
||||
|
||||
启动脚本内容如下:
|
||||
|
||||
```sh
|
||||
docker run -d \
|
||||
-p 5672:5672 \
|
||||
-p 15672:15672 \
|
||||
-p 61613:61613 \
|
||||
-v ./data:/var/lib/rabbitmq/mnesia \
|
||||
-v ./conf/conf.d:/etc/rabbitmq/conf.d \
|
||||
--hostname rabbitmq \
|
||||
--name rabbitmq \
|
||||
quay.io/wandoubaba517/rabbitmq:3.13.4
|
||||
```
|
||||
|
||||
## 停止服务
|
||||
|
||||
用`docker stop <container_name>`或者`docker rm -f <container_name>`即可。
|
||||
|
||||
## 数据持久化
|
||||
|
||||
将容器的`/var/lib/rabbitmq/mnesia`目录映射到`./data`目录。
|
35
conf/conf.d/10-defaults.conf
Normal file
35
conf/conf.d/10-defaults.conf
Normal file
@ -0,0 +1,35 @@
|
||||
## DEFAULT SETTINGS ARE NOT MEANT TO BE TAKEN STRAIGHT INTO PRODUCTION
|
||||
## see https://www.rabbitmq.com/configure.html for further information
|
||||
## on configuring RabbitMQ
|
||||
|
||||
## allow access to the guest user from anywhere on the network
|
||||
## https://www.rabbitmq.com/access-control.html#loopback-users
|
||||
## https://www.rabbitmq.com/production-checklist.html#users
|
||||
loopback_users.guest = true
|
||||
|
||||
## Send all logs to stdout/TTY. Necessary to see logs when running via
|
||||
## a container
|
||||
log.console = true
|
||||
|
||||
disk_free_limit.absolute = 6G
|
||||
|
||||
vm_memory_high_watermark.relative = 0.7
|
||||
|
||||
default_vhost = /
|
||||
default_user = NMSqYajjC2sBSmUhKSuGqgvWmLeLEmTf
|
||||
default_pass = znqBZ8mFqe5TSnpg5pALkPZRcYpwEcua
|
||||
|
||||
default_permissions.configure = .*
|
||||
default_permissions.read = .*
|
||||
default_permissions.write = .*
|
||||
|
||||
## Tags for default user
|
||||
##
|
||||
## For more details about tags, see the documentation for the
|
||||
## Management Plugin at https://rabbitmq.com/management.html.
|
||||
##
|
||||
default_user_tags.administrator = true
|
||||
|
||||
## Define other tags like this:
|
||||
default_user_tags.management = true
|
||||
# default_user_tags.custom_tag = true
|
Loading…
Reference in New Issue
Block a user