33 lines
No EOL
847 B
YAML
33 lines
No EOL
847 B
YAML
services:
|
|
|
|
mongo:
|
|
image: mongo
|
|
container_name: mongo
|
|
restart: always
|
|
environment:
|
|
MONGO_INITDB_ROOT_USERNAME: root
|
|
MONGO_INITDB_ROOT_PASSWORD: mongo
|
|
volumes:
|
|
- ./mongodb/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
|
|
- ./mongodb/mongod.conf:/etc/mongod.conf:ro
|
|
- mongodata:/data/db
|
|
command: ["mongod", "--config", "/etc/mongod.conf"]
|
|
ports:
|
|
- "27017:27017"
|
|
|
|
mongo-express:
|
|
image: mongo-express
|
|
container_name: mongo-express
|
|
restart: always
|
|
ports:
|
|
- 8082:8081
|
|
environment:
|
|
ME_CONFIG_MONGODB_ADMINUSERNAME: root
|
|
ME_CONFIG_MONGODB_ADMINPASSWORD: mongo
|
|
ME_CONFIG_MONGODB_URL: mongodb://root:mongo@mongo:27017/
|
|
ME_CONFIG_BASICAUTH: false
|
|
depends_on:
|
|
- mongo
|
|
|
|
volumes:
|
|
mongodata: |