RabbitMQ Setup
Leyu uses RabbitMQ for asynchronous background jobs and messaging between services.
Steps
1. Install RabbitMQ Locally
Follow the official RabbitMQ installation guide for your operating system:
https://www.rabbitmq.com/download.html
2. Start RabbitMQ Service
On macOS or Linux:
# Start RabbitMQ server
rabbitmq-server
On Windows, use the RabbitMQ Service from the start menu or command prompt.
3. Configure Backend
Set the RabbitMQ URL in your .env file:
RABBITMQ_URL=amqp://localhost:5672
Optional: Run RabbitMQ Using Docker
If you prefer running RabbitMQ in a container:
docker run -d --name leyu-rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
--name leyu-rabbitmq: container name-p 5672:5672: RabbitMQ messaging port-p 15672:15672: management dashboard portrabbitmq:3-management: RabbitMQ image with web management plugin After starting the container, your .env remains:
RABBITMQ_URL=amqp://localhost:5672
You can verify the container is running:
docker ps
Access the RabbitMQ management dashboard at: http://localhost:15672
(Default username/password: guest / guest)