mongo-express是一款用node.js开发的基于Web的MongoDB数据库管理工具。

如果是采用镜像方式去安装mongo-express,其在安装的时候需要依赖于MongoDB镜像,其对应的docker-compose.yml文件为:

# Use root/example as user/password credentials
version: '3.1'

services:

  mongo:
    image: mongo
    restart: always
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: example

  mongo-express:
    image: mongo-express
    restart: always
    ports:
      - 8081:8081
    environment:
      ME_CONFIG_MONGODB_ADMINUSERNAME: root
      ME_CONFIG_MONGODB_ADMINPASSWORD: example
      ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/

下面这两个地方都有使用镜像方式去安装mongo-express的细节:

https://hub.docker.com/_/mongo
https://github.com/mongo-express/mongo-express
Logo

一站式 AI 云服务平台

更多推荐