guestbooky/build/docker-compose.local.yml

33 lines
847 B
YAML
Raw Permalink Normal View History

2024-10-05 00:27:04 +02:00
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: