-
Demonstrates example RabbitMQ simple producer/consumer running in Docker container
-
Run MySQL, MongoDB, and Redis in docker
-
The project can used in development environment
-
Do not use in production environment
git clone the project
git clone https://github.com/theja0473/docker-mysql-mongo-redis-rabbitmq-producer-consumer.git
Set the environment variable RABBIT_HOST_IP. This should be the host IP you get using e.g. ifconfig.
$ export RABBIT_HOST_IP=<your host IP - not localhost or 127.0.0.1>
cd docker-mysql-mongo-redis-rabbitmq-producer-consumer
docker-compose up -d
# show docker-compose log
docker-compose logs -f
database | username | password |
---|---|---|
mysql | root | root |
mongo | / | / |
redis | / | / |
If your environment variable is set incorrectly, you'll get something like
$ pika.exceptions.AMQPConnectionError: Connection to 127.0.0.1:5672 failed: [Errno 111] Connection refused
http://${RABBIT_HOST_IP}:15672 or if running locally http://127.0.0.1:15672/
Note: The default administrator username and password are guest and guest.