添加mongo-express的docker-compose

This commit is contained in:
KennyLee 2018-08-13 18:15:39 +08:00
parent fb51492a0f
commit 989fdcf4b0
4 changed files with 64 additions and 0 deletions

4
mongo-db/README.md Executable file
View File

@ -0,0 +1,4 @@
# MongoDB
基于官方 [mongodb](https://hub.docker.com/_/mongo/) 进行修改,容器内安装一些基础命令,国内安装源配置、中文支持和中国时区修改。但其主要目的是利用阿里云进行下载提速。

View File

@ -0,0 +1,25 @@
version: '3.5'
services:
mongodb:
image: registry.cn-hangzhou.aliyuncs.com/kennylee/mongodb:4.1.1-xenial
container_name: "mongo-db"
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=111111
volumes:
- ./data/db/:/data/db
restart: on-failure
logging:
driver: 'json-file'
options:
max-size: '30m'
max-file: '1'
networks:
- mongo_net
networks:
mongo_net:
name: mongo_net

7
mongo-express/README.md Executable file
View File

@ -0,0 +1,7 @@
# Mongo-express
跟官方 [mongo-express](https://hub.docker.com/_/mongo-express/) 完全一样,仅仅是利用阿里云进行下载提速。
> 注docker-compose使用时确定跟跟mangodb容器的网络的互通的目前绑定的network为`mongo_net`

View File

@ -0,0 +1,28 @@
version: '3.5'
services:
mongo_express:
image: registry.cn-hangzhou.aliyuncs.com/kennylee/mongo-express
container_name: "mongo-express"
ports:
- "7601:8081"
environment:
- ME_CONFIG_MONGODB_SERVER=mongo-db
- ME_CONFIG_MONGODB_ADMINUSERNAME=root
- ME_CONFIG_MONGODB_ADMINPASSWORD=111111
- ME_CONFIG_MONGODB_PORT=27017
- ME_CONFIG_MONGODB_AUTH_DATABASE=admin
- ME_CONFIG_OPTIONS_EDITORTHEME=admin
- ME_CONFIG_BASICAUTH_USERNAME=111111
restart: on-failure
logging:
driver: 'json-file'
options:
max-size: '30m'
max-file: '1'
networks:
- mongo_net
networks:
mongo_net:
name: mongo_net