add mongo docker ocmpose
This commit is contained in:
parent
71bde97226
commit
ae6ccd559f
2 changed files with 30 additions and 0 deletions
28
parts/3/docker-compose.yml
Normal file
28
parts/3/docker-compose.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
mongo:
|
||||
image: mongo
|
||||
environment:
|
||||
- MONGO_INITDB_ROOT_USERNAME=${MONGO_ROOT_USER}
|
||||
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
|
||||
- MONGO_INITDB_DATABASE=project
|
||||
ports:
|
||||
- '27017:27017'
|
||||
volumes:
|
||||
- ./data:/data/db
|
||||
mongo-express:
|
||||
image: mongo-express
|
||||
environment:
|
||||
- ME_CONFIG_MONGODB_SERVER=mongo
|
||||
- ME_CONFIG_MONGODB_PORT=27017
|
||||
- ME_CONFIG_MONGODB_ENABLE_ADMIN=true
|
||||
- ME_CONFIG_MONGODB_AUTH_DATABASE=admin
|
||||
- ME_CONFIG_MONGODB_AUTH_USERNAME=${MONGO_ROOT_USER}
|
||||
- ME_CONFIG_MONGODB_AUTH_PASSWORD=${MONGO_ROOT_PASSWORD}
|
||||
- ME_CONFIG_BASICAUTH_USERNAME=${MONGOEXPRESS_LOGIN}
|
||||
- ME_CONFIG_BASICAUTH_PASSWORD=${MONGOEXPRESS_PASSWORD}
|
||||
depends_on:
|
||||
- mongo
|
||||
ports:
|
||||
- "8888:8081"
|
||||
Loading…
Add table
Add a link
Reference in a new issue