35 lines
737 B
YAML
35 lines
737 B
YAML
|
version: '3'
|
||
|
services:
|
||
|
mongodb:
|
||
|
image: mongo
|
||
|
networks:
|
||
|
- mongo-network
|
||
|
container_name: mongodb
|
||
|
restart: always
|
||
|
ports:
|
||
|
- 27017:27017
|
||
|
environment:
|
||
|
- MONGO_INITDB_ROOT_USERNAME=admin
|
||
|
- MONGO_INITDB_ROOT_PASSWORD=admin
|
||
|
volumes:
|
||
|
- mongo_data:/data/db
|
||
|
mongo-express:
|
||
|
image: mongo-express
|
||
|
networks:
|
||
|
- mongo-network
|
||
|
container_name: mongo-express
|
||
|
restart: always
|
||
|
ports:
|
||
|
- 8081:8081
|
||
|
environment:
|
||
|
- ME_CONFIG_MONGODB_ADMINUSERNAME=admin
|
||
|
- ME_CONFIG_MONGODB_ADMINPASSWORD=admin
|
||
|
- ME_CONFIG_MONGODB_SERVER=mongodb
|
||
|
volumes:
|
||
|
mongo_data:
|
||
|
driver: local
|
||
|
name: mongo-db-data
|
||
|
networks:
|
||
|
mongo-network:
|
||
|
name: mongo-network-zct
|