Skip to content

Commit 848d8cb

Browse files
authored
Re-add rabbitmq docs section for auth env vars (#2069)
1 parent dfa83a3 commit 848d8cb

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

rabbitmq/content.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,24 @@ RABBITMQ_SSL_VERIFY
5454
RABBITMQ_VM_MEMORY_HIGH_WATERMARK
5555
```
5656

57+
### Setting default user and password
58+
59+
If you wish to change the default username and password of `guest` / `guest`, you can do so with the `RABBITMQ_DEFAULT_USER` and `RABBITMQ_DEFAULT_PASS` environmental variables. These variables were available previously in the docker-specific entrypoint shell script but are now available in RabbitMQ directly.
60+
61+
```console
62+
$ docker run -d --hostname my-rabbit --name some-rabbit -e RABBITMQ_DEFAULT_USER=user -e RABBITMQ_DEFAULT_PASS=password %%IMAGE%%:3-management
63+
```
64+
65+
You can then go to `http://localhost:8080` or `http://host-ip:8080` in a browser and use `user`/`password` to gain access to the management console
66+
67+
### Setting default vhost
68+
69+
If you wish to change the default vhost, you can do so with the `RABBITMQ_DEFAULT_VHOST` environmental variables:
70+
71+
```console
72+
$ docker run -d --hostname my-rabbit --name some-rabbit -e RABBITMQ_DEFAULT_VHOST=my_vhost %%IMAGE%%:3-management
73+
```
74+
5775
### Memory Limits
5876

5977
RabbitMQ contains functionality which explicitly tracks and manages memory usage, and thus needs to be made aware of cgroup-imposed limits (e.g. [`docker run --memory=..`](https://docs.docker.com/config/containers/resource_constraints/#limit-a-containers-access-to-memory)).

0 commit comments

Comments
 (0)