mirror of
https://gitee.com/kennylee/docker.git
synced 2024-11-29 18:38:34 +08:00
添加mongo-express的docker-compose
This commit is contained in:
parent
fb51492a0f
commit
989fdcf4b0
4
mongo-db/README.md
Executable file
4
mongo-db/README.md
Executable file
@ -0,0 +1,4 @@
|
||||
# MongoDB
|
||||
|
||||
基于官方 [mongodb](https://hub.docker.com/_/mongo/) 进行修改,容器内安装一些基础命令,国内安装源配置、中文支持和中国时区修改。但其主要目的是利用阿里云进行下载提速。
|
||||
|
25
mongo-db/docker-compose.yml
Normal file
25
mongo-db/docker-compose.yml
Normal 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
7
mongo-express/README.md
Executable file
@ -0,0 +1,7 @@
|
||||
# Mongo-express
|
||||
|
||||
跟官方 [mongo-express](https://hub.docker.com/_/mongo-express/) 完全一样,仅仅是利用阿里云进行下载提速。
|
||||
|
||||
> 注:docker-compose使用时,确定跟跟mangodb容器的网络的互通的,目前绑定的network为`mongo_net`
|
||||
|
||||
|
28
mongo-express/docker-compose.yml
Normal file
28
mongo-express/docker-compose.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user