configurations/Docker/Composer/MongoDB/docker-compose.yml

16 lines
480 B
YAML

version: "3.9"
services:
mongodb:
image: mongo
restart: unless-stopped
volumes:
- "/opt/docker/mongodb-1-repl/conf:/etc/mongo:"
- "/opt/docker/mongodb-1-repl/mongo-keyfile:/etc/mongo-keyfile"
- "/opt/docker/mongodb-1-repl/data:/var/lib/mongodb"
- "/opt/docker/mongodb-1-repl/logs:/var/log"
hostname: staff.libraryofcode.org
command: mongod --config /etc/mongo/mongod.conf
network_mode: "host"
#ports:
# - "27018:27017"