发布时间:2021-11-14作者:laosun阅读(1331)
docker-compose 安装 MongoDB和mongo-express可视化
docker-compose.yaml
version: '3.9' networks: mongo-network: external: false services: mongo: image: mongo:latest networks: - mongo-network container_name: mongo restart: always ports: - 27017:27017 environment: MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: root mongo-express: image: mongo-express restart: always ports: - 8081:8081 environment: ME_CONFIG_MONGODB_ADMINUSERNAME: root ME_CONFIG_MONGODB_ADMINPASSWORD: root ME_CONFIG_MONGODB_URL: mongodb://root:root@mongo:27017/ depends_on: - mongo networks: - mongo-network
版权属于: 技术客
原文地址: https://www.sunjs.com/article/detail/1bc1189413a943d4ba2d0b0338d3409e.html
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
关键字: 数据库 mongodb docker docker-compose