Skip to content

Instantly share code, notes, and snippets.

@Ishu1998
Created September 22, 2022 17:36
Show Gist options
  • Save Ishu1998/66ed5d15fd04cf0cd01445bdc7504c07 to your computer and use it in GitHub Desktop.
Save Ishu1998/66ed5d15fd04cf0cd01445bdc7504c07 to your computer and use it in GitHub Desktop.
Redis, RabbitMQ, MongoDB in Docker Compose
version: "3.7"
services:
rabbitmq:
hostname: "rabbit_node_1"
image: rabbitmq:management
container_name: rabbitmq
ports:
- 5672:5672
- 15672:15672
networks:
- database
# network_mode: host
volumes:
- rabbitmq:/var/lib/rabbitmq
mongodb:
image: mongo
container_name: mongo
ports:
- 27017:27017
networks:
- database
volumes:
- mongo:/data/db
redis:
image: redis
container_name: redis
ports:
- 6379:6379
networks:
- database
volumes:
- redis:/dataredis/db
networks:
database:
driver: bridge
name: database_network
volumes:
rabbitmq:
driver: local
mongo:
driver: local
redis:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment