https://github.com/ddev/ddev-rabbitmq
Adds a rabbitmq service to ddev
https://github.com/ddev/ddev-rabbitmq
ddev-get
Last synced: 12 months ago
JSON representation
Adds a rabbitmq service to ddev
- Host: GitHub
- URL: https://github.com/ddev/ddev-rabbitmq
- Owner: b13
- License: apache-2.0
- Created: 2023-10-17T18:52:56.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-05T08:32:20.000Z (almost 2 years ago)
- Last Synced: 2024-08-05T09:59:03.141Z (almost 2 years ago)
- Topics: ddev-get
- Language: Shell
- Homepage:
- Size: 97.7 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://addons.ddev.com)
[](https://github.com/ddev/ddev-rabbitmq/actions/workflows/tests.yml?query=branch%3Amain)
[](https://github.com/ddev/ddev-rabbitmq/commits)
[](https://github.com/ddev/ddev-rabbitmq/releases/latest)
# DDEV RabbitMQ
## Overview
[RabbitMQ](https://www.rabbitmq.com/) is a message-queueing software also known as a message broker or queue manager.
This add-on integrates RabbitMQ into your [DDEV](https://ddev.com/) project and creates users/queues according to the configuration defined in [`.ddev/rabbitmq/config.yaml`](rabbitmq/config.yaml).
## Installation
```bash
ddev add-on get ddev/ddev-rabbitmq
ddev restart
```
After installation, make sure to commit the `.ddev` directory to version control.
## Configuration
From within the container, the RabbitMQ container is reached at hostname: `rabbitmq` on port `5672`, so
the server URL will be `amqp://rabbitmq:5672`.
For more details check the connection section below.
### YAML configuration
The [rabbitmq/config.yaml](rabbitmq/config.yaml) describes
vhosts, queues, users and plugins.
The configuration can be applied with the following command:
```bash
ddev rabbitmq apply
```
> [!NOTE]
> This may not cover all possible configuration values! But it is a good start.
To ensure the configuration is applied automatically on boot, add the following
hook to your `.ddev/config.yaml`:
```yaml
hooks:
post-start:
- exec-host: ddev solrctl apply
```
Remove rabbitmq configuration but keep default user (`rabbitmq`) and vhost (`/`):
```bash
ddev rabbitmq wipe
```
## Usage
| Command | Description |
|-----------------------------|--------------------------------------------------------------------------------|
| `ddev rabbitmq --help` | RabbitMQ custom helper command |
| `ddev rabbitmqadmin --help` | RabbitMQ Management CLI (no auth required) |
| `ddev rabbitmqctl --help` | Used to manage the cluster and nodes |
| `ddev rabbitmq launch` | Launch RabbitMQ Management UI in the browser (credentials `rabbitmq:rabbitmq`) |
| `ddev describe` | View service status and used ports for RabbitMQ |
| `ddev logs -s rabbitmq` | Check RabbitMQ logs |
ℹ️`rabbitmqadmin` and `rabbitmqctl` share some functions. Both are needed for full configuration.
## Connection
RabbitMQ is accessible from the host machine itself as well as between the containers on the same network, and comes
with a nice management UI for ease of use.
### Management UI
The management UI can be accessed through `https://.ddev.site:15673` (`ddev launch :15673`) on the host machine.
Management UI credentials
* Username: `rabbitmq`
* Password: `rabbitmq`
For more information about the HTTP API see the [official documentation](https://www.rabbitmq.com/docs).
### AMQP protocol access
You can access the RabbitMQ service through its AMQP protocol inside any DDEV container via `amqp://rabbitmq:5672`
## Advanced Customization
To change the Docker image:
```bash
ddev dotenv set .ddev/.env.rabbitmq --rabbitmq-docker-image="rabbitmq:4-management-alpine"
ddev add-on get ddev/ddev-rabbitmq
ddev restart
```
Make sure to commit the `.ddev/.env.rabbitmq` file to version control.
## Examples
* [TYPO3](USAGE.md)
## Credits
**Originally Contributed by [@Graloth](https://github.com/Graloth) in [ddev-contrib](https://github.com/ddev/ddev-contrib/tree/master/docker-compose-services/rabbitmq)**
**Maintained by [@b13](https://github.com/b13)**