{
  "slug": "Docker-Compose-Setup-for-MongoDB--Redis--and-Minio-f364e79162ea",
  "title": "Docker Compose Setup for MongoDB, Redis, and Minio",
  "subtitle": "This Docker Compose file sets up a development environment with MongoDB, Redis, and Minio and their respective management interfaces. The…",
  "excerpt": "This Docker Compose file sets up a development environment with MongoDB, Redis, and Minio and their respective management interfaces. The…",
  "date": "2024-07-29",
  "tags": [
    "Redis",
    "MongoDB",
    "Docker"
  ],
  "readingTime": "1 min",
  "url": "https://medium.com/@mobinshaterian/docker-compose-setup-for-mongodb-redis-and-minio-f364e79162ea",
  "hero": "https://cdn-images-1.medium.com/max/800/1*f-OjtziN6MjN7gn8i9hB1w.jpeg",
  "content": [
    {
      "type": "heading",
      "level": 2,
      "text": "Docker Compose Setup for MongoDB, Redis, and Minio"
    },
    {
      "type": "paragraph",
      "html": "This Docker Compose file sets up a development environment with MongoDB, Redis, and Minio and their respective management interfaces. The setup is language-agnostic and can be used with various projects."
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*f-OjtziN6MjN7gn8i9hB1w.jpeg",
      "alt": "Docker Compose Setup for MongoDB, Redis, and Minio",
      "caption": "",
      "width": 1024,
      "height": 1024
    },
    {
      "type": "code",
      "lang": "yaml",
      "code": "version: '3.9'services:\n  mongo:\n    image: mongo:latest\n    restart: always\n    ports:\n      - \"27017:27017\"\n  mongoexpress:\n    image: mongo-express\n    ports:\n      - \"8081:8081\"\n    environment:       - ME_CONFIG_MONGODB_URL=mongodb://mongo:27017\n      - ME_CONFIG_BASICAUTH=true\n    depends_on:\n      - mongo\n    restart: always\n  redis:\n    image: redis:latest\n    restart: always\n    ports:\n      - \"6379:6379\"\n  redis-commander:\n    image: rediscommander/redis-commander:latest\n    restart: always\n    environment:\n      - REDIS_HOSTS=local:redis:6379\n    ports:\n      - 8082:8081\n    depends_on:\n      - redis\n  minio:\n    image: docker.io/bitnami/minio:latest\n    ports:\n      - '9000:9000'\n      - '9001:9001'\n    volumes:\n      - 'minio_data:/data'\n    environment:\n      - MINIO_ROOT_USER=username\n      - MINIO_ROOT_PASSWORD=pasword_is_here\n      - MINIO_DEFAULT_BUCKETS=name_bucket\n    restart: alwaysvolumes:\n  mongo_data:\n    driver: local\n  minio_data:\n    driver: local networks:\n  default:\n    external:\n      name: my-network"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Mongo express"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "http://127.0.0.1:8081/db/admin/"
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*8GxHarxhynYBvCR_8xVKOw.png",
      "alt": "Docker Compose Setup for MongoDB, Redis, and Minio",
      "caption": "",
      "width": 1211,
      "height": 614
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Redis Commander"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "http://127.0.0.1:8082/"
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*trP_xRfzuIKhIna_sTJLvg.png",
      "alt": "Docker Compose Setup for MongoDB, Redis, and Minio",
      "caption": "",
      "width": 304,
      "height": 134
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Minio"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "http://127.0.0.1:9001/browser"
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*yE3XIsfloiVCwU91AWThSw.png",
      "alt": "Docker Compose Setup for MongoDB, Redis, and Minio",
      "caption": "",
      "width": 1574,
      "height": 422
    }
  ]
}
